@@ -4,13 +4,11 @@ package windows
44
55import (
66 "encoding/json"
7- "errors"
87 "fmt"
98 "os"
109 "path/filepath"
1110 "strconv"
1211 "strings"
13- "syscall"
1412
1513 "github.com/Sirupsen/logrus"
1614 "github.com/docker/docker/daemon/execdriver"
@@ -279,21 +277,11 @@ func (d *Driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, hooks execd
279277 // Configure the environment for the process
280278 createProcessParms .Environment = setupEnvironmentVariables (c .ProcessConfig .Env )
281279
282- // This should get caught earlier, but just in case - validate that we
283- // have something to run
284- if c .ProcessConfig .Entrypoint == "" {
285- err = errors .New ("No entrypoint specified" )
286- logrus .Error (err )
287- return execdriver.ExitStatus {ExitCode : - 1 }, err
288- }
280+ createProcessParms .CommandLine , err = createCommandLine (& c .ProcessConfig , c .ArgsEscaped )
289281
290- // Build the command line of the process
291- createProcessParms .CommandLine = c .ProcessConfig .Entrypoint
292- for _ , arg := range c .ProcessConfig .Arguments {
293- logrus .Debugln ("appending " , arg )
294- createProcessParms .CommandLine += " " + syscall .EscapeArg (arg )
282+ if err != nil {
283+ return execdriver.ExitStatus {ExitCode : - 1 }, err
295284 }
296- logrus .Debugf ("CommandLine: %s" , createProcessParms .CommandLine )
297285
298286 // Start the command running in the container.
299287 pid , stdin , stdout , stderr , _ , err := hcsshim .CreateProcessInComputeSystem (c .ID , pipes .Stdin != nil , true , ! c .ProcessConfig .Tty , createProcessParms )
0 commit comments