Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
file: avoid exit(0) for stdin case (#571)
* file: avoid exit(0) for stdin case * Usage "file -" is allowed for GNU and OpenBSD: explicitly read stdin * The usage "file" with no argument is not valid; stdin is not read implicitly * This version doesn't support "file -", but the argument loop terminates and results in exit(0) * Using die for this not-implemented error results in non-zero exit code, which is more compatible with the standard[1] 1. https://pubs.opengroup.org/onlinepubs/007904975/utilities/file.html * exit directly for better control of exit codes
- Loading branch information
Showing
1 changed file
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters