diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-10-09 10:25:30 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-10-13 19:43:07 +0100 |
commit | 09983e35984755339ce379e41d6f9dcd5587f7bf (patch) | |
tree | 75151ef1b5aaa7852c99f91a32cd9951b39ba668 | |
parent | 15a4c40852cca4693c8b3b483bc0280efb03cd42 (diff) | |
download | subplot-09983e35984755339ce379e41d6f9dcd5587f7bf.tar.gz |
check: Add support for newer pandoc without pandoc-citeproc
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rwxr-xr-x | check | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -90,6 +90,11 @@ class Runcmd: p = self.runcmd_unchecked(["which", name], stdout=DEVNULL) return p.returncode == 0 + def pandoc_is_newer(self): + """Is pandoc new enough for --citeproc""" + p = self.runcmd(["pandoc", "--help"], stdout=PIPE) + return "--citeproc" in p.stdout.decode("UTF-8") + def cargo(self, args, **kwargs): """Run cargo with arguments.""" self.runcmd(["cargo"] + args, **kwargs) @@ -329,6 +334,10 @@ def check_tooling(r): ] for command in commands: if not r.got_command(command): + if command == "pandoc-citeproc": + if r.pandoc_is_newer(): + r.msg(" Fortunately pandoc is new enough for --citeproc, no need for pandoc-citeproc") + continue sys.exit(f"can't find {command}, which is needed for test suite") if not r.got_command("daemonize") and not r.got_command("/usr/sbin/daemonize"): |