getpelican / pelican-plugins

Collection of plugins for the Pelican static site generator
Other
1.39k stars 856 forks source link

[asciidoc_reader] Issue with detecting available binaries #1401

Open tpwo opened 1 month ago

tpwo commented 1 month ago

Hi, I noticed an issue with asciidoc_reader plugin when trying to run it from Docker. I noticed that the current logic is specified as follows:

    for cmd in ALLOWED_CMDS:
        if len(call(cmd + " --help")):
            logger.debug('AsciiDocReader: Using cmd: %s', cmd)
            return cmd

len(call(cmd + " --help")) seems to be non-zero i.e True even when checking for asciidoc which is not present in my Docker image.

This later causes the following error:

[21:13:38] WARNING  AsciiDocReader: strderr: b'/bin/sh: asciidoc: not  log.py:89
                    found\n'