Interactive mode preserves existing PATH, to facilitate scripting

This commit is contained in:
Solomon Hykes 2013-02-20 14:45:43 -08:00
parent 52fa34605c
commit 754cf30b0e
1 changed files with 1 additions and 1 deletions

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