Fix incorrect exception when tic fails

This commit is contained in:
Kovid Goyal 2023-09-30 07:53:13 +05:30
parent e04e5a157f
commit 1aaaa3f1e9
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -162,9 +162,10 @@ def compile_terminfo(base):
[tic, '-x', '-o', os.path.join(base, tname), os.path.join(base, '.terminfo', 'kitty.terminfo')],
stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
output = p.stdout.read()
rc = p.wait()
if rc != 0:
getattr(sys.stderr, 'buffer', sys.stderr).write(p.stdout)
getattr(sys.stderr, 'buffer', sys.stderr).write(output)
raise SystemExit('Failed to compile the terminfo database')