Skip to content

batches: make `-f` optional

Erik Seliger requested to merge aharvey/stdin into main

Created by: LawnGnome

New behaviour (assuming COMMAND is any command that accepted -f, including apply, preview, repos, or validate):

  • src batch COMMAND on a TTY: will wait for 250ms in case there's input on stdin; otherwise errors
  • src batch COMMAND with a file redirected in: waits indefinitely for input
  • src batch COMMAND -f -: waits indefinitely for input
  • src batch COMMAND FILE: reads from FILE; equivalent to src batch COMMAND -f FILE
  • src batch COMMAND -f FILE: works as before

In summary, this shouldn't break backward compatibility in any case except for the user slowly typing in a batch spec on stdin.

Fixes #680.

Merge request reports

Loading