mirror of https://github.com/docker/cli.git
Automatically remove the rcfile generated by docker -i from /tmp
This commit is contained in:
parent
df5134f46e
commit
d895b3a7f8
|
@ -111,6 +111,7 @@ func InteractiveMode(scripts ...string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
defer os.Remove(rcfile.Name())
|
||||||
io.WriteString(rcfile, "enable -n help\n")
|
io.WriteString(rcfile, "enable -n help\n")
|
||||||
os.Setenv("PATH", tmp+":"+os.Getenv("PATH"))
|
os.Setenv("PATH", tmp+":"+os.Getenv("PATH"))
|
||||||
os.Setenv("PS1", "\\h docker> ")
|
os.Setenv("PS1", "\\h docker> ")
|
||||||
|
|
Loading…
Reference in New Issue