|
@@ -509,3 +509,14 @@ func (s *DockerSuite) TestExecStartFails(c *check.C) {
|
|
c.Assert(err, checker.NotNil, check.Commentf(out))
|
|
c.Assert(err, checker.NotNil, check.Commentf(out))
|
|
c.Assert(out, checker.Contains, "executable file not found")
|
|
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`)
|
|
|
|
+}
|