зеркало из https://github.com/docker/engine-api.git
Interactive mode preserves existing PATH, to facilitate scripting
This commit is contained in:
Родитель
a86c85ae38
Коммит
f0be2b3096
|
@ -112,7 +112,7 @@ func InteractiveMode(scripts ...string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
io.WriteString(rcfile, "enable -n help\n")
|
io.WriteString(rcfile, "enable -n help\n")
|
||||||
os.Setenv("PATH", tmp)
|
os.Setenv("PATH", tmp + ":" + os.Getenv("PATH"))
|
||||||
os.Setenv("PS1", "\\h docker> ")
|
os.Setenv("PS1", "\\h docker> ")
|
||||||
shell := exec.Command("/bin/bash", append([]string{"--rcfile", rcfile.Name()}, scripts...)...)
|
shell := exec.Command("/bin/bash", append([]string{"--rcfile", rcfile.Name()}, scripts...)...)
|
||||||
shell.Stdin = os.Stdin
|
shell.Stdin = os.Stdin
|
||||||
|
|
Загрузка…
Ссылка в новой задаче