Skip to content

Commit dd00fa4

Browse files
committed
Print full cmd when bash is not found
1 parent c9a959f commit dd00fa4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/frontend/html.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,12 @@ def _html_wrapper(data):
7575
"""
7676
Convert ANSI text `data` to HTML
7777
"""
78-
proc = Popen(
79-
["bash", CONFIG['path.internal.ansi2html'], "--palette=solarized", "--bg=dark"],
80-
stdin=PIPE, stdout=PIPE, stderr=PIPE)
78+
cmd = ["bash", CONFIG['path.internal.ansi2html'], "--palette=solarized", "--bg=dark"]
79+
try:
80+
proc = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)
81+
except FileNotFoundError:
82+
print("ERROR: %s" % cmd)
83+
raise
8184
data = data.encode('utf-8')
8285
stdout, stderr = proc.communicate(data)
8386
if proc.returncode != 0:

0 commit comments

Comments
 (0)