Skip to content

Commit

Permalink
/ process_args: display usage when stdin was not supplied
Browse files Browse the repository at this point in the history
when user invokes without supplying stdin, we should display help,
rather than crash
  • Loading branch information
smemsh committed Jul 2, 2024
1 parent 761d649 commit 8101d20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions field
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def process_args():
addflag (p, 'N', 'noendrec', "skip ors after last record was emitted")
addflag (p, 'l', 'flushrecs', "do individual writes every record")

if not args: usagex("must supply args on stdin")
args, left = p.parse_known_args(args)

n = len(left)
Expand Down

0 comments on commit 8101d20

Please sign in to comment.