commands/cli: Ignore stdin on Windows
Matt Bell committed
Nov 19, 2014 at 04:29 UTC
4bd2fbc80664ebfd97ca64eb18f3217566adfd11
1 file changed
+6
commands/cli/parse.go
+6
@@ -6,6 +6,7 @@ import (
6
"fmt"
7
"os"
8
fp "path/filepath"
9
+ "runtime"
10
"strings"
11
12
cmds "github.com/jbenet/go-ipfs/commands"
@@ -138,6 +139,11 @@ func parseOptions(input []string) (map[string]interface{}, []string, error) {
139
}
140
141
func parseArgs(inputs []string, stdin *os.File, argDefs []cmds.Argument, recursive bool) ([]string, []cmds.File, error) {
142
+ // ignore stdin on Windows
143
+ if runtime.GOOS == "windows" {
144
+ stdin = nil
145
+ }
146
+
147
// check if stdin is coming from terminal or is being piped in
148
if stdin != nil {
149
if term, err := isTerminal(stdin); err != nil {