Skip to content

Commit

Permalink
Implement tee -p and --output-error
Browse files Browse the repository at this point in the history
This has the following behaviours. On Unix:

- The default is to exit on pipe errors, and warn on other errors.

- "--output-error=warn" means to warn on all errors

- "--output-error", "--output-error=warn-nopipe" and "-p" all mean
  that pipe errors are suppressed, all other errors warn.

- "--output-error=exit" means to warn and exit on all errors.

- "--output-error=exit-nopipe" means to suppress pipe errors, and to
  warn and exit on all other errors.

On non-Unix platforms, all pipe behaviours are ignored, so the default
is effectively "--output-error=warn" and "warn-nopipe" is identical.
The only meaningful option is "--output-error=exit" which is identical
to "--output-error=exit-nopipe" on these platforms.

Note that warnings give a non-zero exit code, but do not halt writing
to non-erroring targets.
  • Loading branch information
eds-collabora committed Jun 23, 2022
1 parent 7d807f3 commit 7b99984
Show file tree
Hide file tree
Showing 4 changed files with 615 additions and 120 deletions.
Loading

0 comments on commit 7b99984

Please sign in to comment.