Commit 8a7e45e7 authored by Jeromy's avatar Jeromy

remove badcode

License: MIT
Signed-off-by: default avatarJeromy <why@ipfs.io>
parent 36285b14
......@@ -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) {
......@@ -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
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment