From 754cf30b0e88d67a0e04a8e4b1792669788a2c1b Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Wed, 20 Feb 2013 14:45:43 -0800 Subject: [PATCH] Interactive mode preserves existing PATH, to facilitate scripting --- client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.go b/client.go index 164e1be321..5a8aac3807 100644 --- a/client.go +++ b/client.go @@ -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