Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
PR #1863: --break: nice error if stdin is not a TTY
Browse files Browse the repository at this point in the history
  • Loading branch information
reidpr authored Mar 19, 2024
1 parent 5c1a2ba commit d679373
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/ch-image.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ if (__name__ == "__main__"):
for (opt, arg) in zip(sys.argv[1:], sys.argv[2:] + [None]):
(opt, _, arg_eq) = opt.partition("=")
if (opt == "--break"):
if (not sys.stdin.isatty()):
ch.FATAL("--break: standard input must be a terminal")
if (arg_eq != ""):
arg = arg_eq
try:
Expand Down

0 comments on commit d679373

Please sign in to comment.