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:
@ -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`)
|
||||
}
|
||||
|
Reference in New Issue
Block a user