Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-cmds
Commits
d4d995b5
Commit
d4d995b5
authored
Nov 19, 2014
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/cli: Ignore stdin on Windows
parent
67621dc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
cli/parse.go
cli/parse.go
+6
-0
No files found.
cli/parse.go
View file @
d4d995b5
...
@@ -6,6 +6,7 @@ import (
...
@@ -6,6 +6,7 @@ import (
"fmt"
"fmt"
"os"
"os"
fp
"path/filepath"
fp
"path/filepath"
"runtime"
"strings"
"strings"
cmds
"github.com/jbenet/go-ipfs/commands"
cmds
"github.com/jbenet/go-ipfs/commands"
...
@@ -138,6 +139,11 @@ func parseOptions(input []string) (map[string]interface{}, []string, error) {
...
@@ -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
)
{
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
// check if stdin is coming from terminal or is being piped in
if
stdin
!=
nil
{
if
stdin
!=
nil
{
if
term
,
err
:=
isTerminal
(
stdin
);
err
!=
nil
{
if
term
,
err
:=
isTerminal
(
stdin
);
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment