This fixes the case where arguments are escaped twice from Dockerfiles on
Windows Signed-off-by: Darren Stahl <darst@microsoft.com> Upstream-commit: 9db5db1b94bc1000d151315851096dcc6cd3512d Component: engine
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
package windows
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
@ -34,22 +33,12 @@ func (d *Driver) Exec(c *execdriver.Command, processConfig *execdriver.ProcessCo
|
||||
// Configure the environment for the process // Note NOT c.ProcessConfig.Tty
|
||||
createProcessParms.Environment = setupEnvironmentVariables(processConfig.Env)
|
||||
|
||||
// While this should get caught earlier, just in case, validate that we
|
||||
// have something to run.
|
||||
if processConfig.Entrypoint == "" {
|
||||
err = errors.New("No entrypoint specified")
|
||||
logrus.Error(err)
|
||||
createProcessParms.CommandLine, err = createCommandLine(&c.ProcessConfig, c.ArgsEscaped)
|
||||
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
|
||||
// Build the command line of the process
|
||||
createProcessParms.CommandLine = processConfig.Entrypoint
|
||||
for _, arg := range processConfig.Arguments {
|
||||
logrus.Debugln("appending ", arg)
|
||||
createProcessParms.CommandLine += " " + arg
|
||||
}
|
||||
logrus.Debugln("commandLine: ", createProcessParms.CommandLine)
|
||||
|
||||
// Start the command running in the container.
|
||||
pid, stdin, stdout, stderr, rc, err := hcsshim.CreateProcessInComputeSystem(c.ID, pipes.Stdin != nil, true, !processConfig.Tty, createProcessParms)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user