Interactive mode preserves existing PATH, to facilitate scripting

Upstream-commit: db4c75f3c1cdbc654595bb3dda5455a93c1b56b4
Component: engine
This commit is contained in:
Solomon Hykes
2013-02-20 14:45:43 -08:00
parent bd1dc2a768
commit 27db035d5d
+1 -1
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