1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #14417 from crosbymichael/attach-stdin

Always attach STDIN if -i,--interactive is specified
This commit is contained in:
Jessie Frazelle 2015-07-07 18:07:46 -07:00
commit 25151eb24e

View file

@ -156,14 +156,13 @@ func Parse(cmd *flag.FlagSet, args []string) (*Config, *HostConfig, *flag.FlagSe
return nil, nil, cmd, fmt.Errorf("%s is not a valid mac address", *flMacAddress)
}
}
// If neither -d or -a are set, attach to everything by default
if *flStdin {
attachStdin = true
}
// If -a is not set attach to the output stdio
if flAttach.Len() == 0 {
attachStdout = true
attachStderr = true
if *flStdin {
attachStdin = true
}
}
var flMemory int64