@cryptotaxi247 / kubo / commits / 8d6bfec89

parse: improve stdin fix

License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Christian Couder committed May 20, 2015 at 21:28 UTC 8d6bfec890c9687eaebcb7ae43cc1b9b2e9f9d7f
1 file changed +1 -1
commands/cli/parse.go
+1 -1
@@ -223,7 +223,7 @@ func parseArgs(inputs []string, stdin *os.File, argDefs []cmds.Argument, recursi
223 // if there is at least one ArgDef, we can safely trigger the inputs loop
224 // below to parse stdin.
225 numInputs := len(inputs)
226 - if argDef := getArgDef(0, argDefs); argDef != nil && stdin != nil {
226 + if len(argDefs) > 0 && stdin != nil {
227 numInputs += 1
228 }
229