Windows: Fixed escaping of command line arguments
This fixes some tests that were failing on windows Signed-off-by: Darren Stahl <darst@microsoft.com> Upstream-commit: ca5cc770b9f0d473b285f55eb78d507a8669ee41 Component: engine
This commit is contained in:
@ -12,6 +12,7 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/docker/daemon/execdriver"
|
||||
@ -258,7 +259,7 @@ func (d *Driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, hooks execd
|
||||
createProcessParms.CommandLine = c.ProcessConfig.Entrypoint
|
||||
for _, arg := range c.ProcessConfig.Arguments {
|
||||
logrus.Debugln("appending ", arg)
|
||||
createProcessParms.CommandLine += " " + arg
|
||||
createProcessParms.CommandLine += " " + syscall.EscapeArg(arg)
|
||||
}
|
||||
logrus.Debugf("CommandLine: %s", createProcessParms.CommandLine)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user