1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

Windows: Don't set PATH/TERM on exec

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard
2016-09-28 13:34:47 -07:00
parent 601004e1a7
commit e880bbc48b
2 changed files with 21 additions and 5 deletions

View File

@ -509,3 +509,14 @@ func (s *DockerSuite) TestExecStartFails(c *check.C) {
c.Assert(err, checker.NotNil, check.Commentf(out))
c.Assert(out, checker.Contains, "executable file not found")
}
// Fix regression in https://github.com/docker/docker/pull/26461#issuecomment-250287297
func (s *DockerSuite) TestExecWindowsPathNotWiped(c *check.C) {
testRequires(c, DaemonIsWindows)
out, _ := dockerCmd(c, "run", "-d", "--name", "testing", minimalBaseImage(), "powershell", "start-sleep", "60")
c.Assert(waitRun(strings.TrimSpace(out)), check.IsNil)
out, _ = dockerCmd(c, "exec", "testing", "powershell", "write-host", "$env:PATH")
out = strings.ToLower(strings.Trim(out, "\r\n"))
c.Assert(out, checker.Contains, `windowspowershell\v1.0`)
}