Skip to content

Commit

Permalink
remove badcode
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jeromy <why@ipfs.io>
  • Loading branch information
whyrusleeping committed Jul 9, 2016
1 parent 1f6dd26 commit c142534
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions commands/cli/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ import (

var log = logging.Logger("commands/cli")

// stdinSpecialName is a name applied to the 'stdin' file so we can differentiate
// it from potential 'real' files being passed in. The '*' character is invalid in
// path names and won't appear otherwise.
const stdinSpecialName = "*stdin*"

// Parse parses the input commandline string (cmd, flags, and args).
// returns the corresponding command Request object.
func Parse(input []string, stdin *os.File, root *cmds.Command) (cmds.Request, *cmds.Command, []string, error) {
Expand Down Expand Up @@ -312,7 +307,7 @@ func parseArgs(inputs []string, stdin *os.File, argDefs []cmds.Argument, recursi
} else {
if stdin != nil && argDef.SupportsStdin && !fillingVariadic {
if err := printReadInfo(stdin, msgStdinInfo); err == nil {
fileArgs[stdin.Name()] = files.NewReaderFile(stdinSpecialName, "", stdin, nil)
fileArgs[stdin.Name()] = files.NewReaderFile("stdin", "", stdin, nil)
stdin = nil
}
}
Expand Down

0 comments on commit c142534

Please sign in to comment.