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

Interactive mode preserves existing PATH, to facilitate scripting

This commit is contained in:
Solomon Hykes 2013-02-20 14:45:43 -08:00
parent e8d48641de
commit db4c75f3c1

View file

@ -112,7 +112,7 @@ func InteractiveMode(scripts ...string) error {
return err
}
io.WriteString(rcfile, "enable -n help\n")
os.Setenv("PATH", tmp)
os.Setenv("PATH", tmp + ":" + os.Getenv("PATH"))
os.Setenv("PS1", "\\h docker> ")
shell := exec.Command("/bin/bash", append([]string{"--rcfile", rcfile.Name()}, scripts...)...)
shell.Stdin = os.Stdin