Don't automatically read stdin when the null input flag is used

This commit is contained in:
Mike Farah
2022-04-27 09:24:25 +10:00
parent 90261a2fdd
commit 70ad7a35a8
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ func processStdInArgs(args []string) []string {
// read from stdin.
// this happens if there is more than one argument
// or only one argument and its a file
if !pipingStdin || len(args) > 1 || (len(args) > 0 && maybeFile(args[0])) {
if nullInput || !pipingStdin || len(args) > 1 || (len(args) > 0 && maybeFile(args[0])) {
return args
}