Skip to content

Commit

Permalink
Use stderr for cli stacktraces
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw authored Jan 12, 2025
1 parent aa4285b commit 9dfbb27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visidata/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,12 @@ def vd_cli():
if vd.options.debug:
raise
except FileNotFoundError as e:
print(e)
print(e, file=sys.stderr)
if options.debug:
raise
except Exception as e:
for l in stacktrace(): #show the stack trace without carets
print(l)
print(l, file=sys.stderr)

sys.stderr.flush()
sys.stdout.flush()
Expand Down

0 comments on commit 9dfbb27

Please sign in to comment.