Fix show_error kitten --title not working

This commit is contained in:
Kovid Goyal 2019-04-28 20:48:57 +05:30
parent 6037167336
commit c6d3ede57e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -17,10 +17,10 @@ The title for the error message.
def real_main(args):
msg = 'Show an error message'
args, items = parse_args(args[1:], OPTIONS, '', msg, 'hints')
error_message = sys.stdin.buffer.read().decode('utf-8')
sys.stdin = open(os.ctermid())
msg = 'Show an error message'
args, items = parse_args(args, OPTIONS, '', msg, 'hints')
print(styled(args.title, fg_intense=True, fg='red', bold=True))
print()
print(error_message)