1
1
mirror of https://github.com/chubin/cheat.sh.git synced 2024-12-02 07:50:04 +03:00

Print full cmd when bash is not found

This commit is contained in:
Anatoli Babenia 2020-07-29 10:49:21 +03:00
parent c9a959f087
commit dd00fa4188

View File

@ -75,9 +75,12 @@ def _render_html(query, result, editable, repository_button, topics_list, reques
""" """
Convert ANSI text `data` to HTML Convert ANSI text `data` to HTML
""" """
proc = Popen( cmd = ["bash", CONFIG['path.internal.ansi2html'], "--palette=solarized", "--bg=dark"]
["bash", CONFIG['path.internal.ansi2html'], "--palette=solarized", "--bg=dark"], try:
stdin=PIPE, stdout=PIPE, stderr=PIPE) proc = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
except FileNotFoundError:
print("ERROR: %s" % cmd)
raise
data = data.encode('utf-8') data = data.encode('utf-8')
stdout, stderr = proc.communicate(data) stdout, stderr = proc.communicate(data)
if proc.returncode != 0: if proc.returncode != 0: