From 4bd2fbc80664ebfd97ca64eb18f3217566adfd11 Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Wed, 19 Nov 2014 04:29:45 -0800 Subject: [PATCH] commands/cli: Ignore stdin on Windows --- commands/cli/parse.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/commands/cli/parse.go b/commands/cli/parse.go index aceec578c..a5a0e0715 100644 --- a/commands/cli/parse.go +++ b/commands/cli/parse.go @@ -6,6 +6,7 @@ import ( "fmt" "os" fp "path/filepath" + "runtime" "strings" cmds "github.com/jbenet/go-ipfs/commands" @@ -138,6 +139,11 @@ func parseOptions(input []string) (map[string]interface{}, []string, error) { } func parseArgs(inputs []string, stdin *os.File, argDefs []cmds.Argument, recursive bool) ([]string, []cmds.File, error) { + // ignore stdin on Windows + if runtime.GOOS == "windows" { + stdin = nil + } + // check if stdin is coming from terminal or is being piped in if stdin != nil { if term, err := isTerminal(stdin); err != nil {