@@ -28,7 +28,6 @@ import (
28
28
"github.com/moby/buildkit/frontend/dockerfile/parser"
29
29
"github.com/moby/buildkit/frontend/dockerfile/shell"
30
30
"github.com/pkg/errors"
31
- "github.com/sirupsen/logrus"
32
31
)
33
32
34
33
// ENV foo bar
@@ -305,10 +304,12 @@ func dispatchWorkdir(d dispatchRequest, c *instructions.WorkdirCommand) error {
305
304
306
305
comment := "WORKDIR " + runConfig .WorkingDir
307
306
runConfigWithCommentCmd := copyRunConfig (runConfig , withCmdCommentString (comment , d .state .operatingSystem ))
307
+
308
308
containerID , err := d .builder .probeAndCreate (d .state , runConfigWithCommentCmd )
309
309
if err != nil || containerID == "" {
310
310
return err
311
311
}
312
+
312
313
if err := d .builder .docker .ContainerCreateWorkdir (containerID ); err != nil {
313
314
return err
314
315
}
@@ -350,8 +351,7 @@ func dispatchRun(d dispatchRequest, c *instructions.RunCommand) error {
350
351
runConfigForCacheProbe := copyRunConfig (stateRunConfig ,
351
352
withCmd (saveCmd ),
352
353
withEntrypointOverride (saveCmd , nil ))
353
- hit , err := d .builder .probeCache (d .state , runConfigForCacheProbe )
354
- if err != nil || hit {
354
+ if hit , err := d .builder .probeCache (d .state , runConfigForCacheProbe ); err != nil || hit {
355
355
return err
356
356
}
357
357
@@ -363,11 +363,11 @@ func dispatchRun(d dispatchRequest, c *instructions.RunCommand) error {
363
363
// set config as already being escaped, this prevents double escaping on windows
364
364
runConfig .ArgsEscaped = true
365
365
366
- logrus .Debugf ("[BUILDER] Command to be executed: %v" , runConfig .Cmd )
367
366
cID , err := d .builder .create (runConfig )
368
367
if err != nil {
369
368
return err
370
369
}
370
+
371
371
if err := d .builder .containerManager .Run (d .builder .clientCtx , cID , d .builder .Stdout , d .builder .Stderr ); err != nil {
372
372
if err , ok := err .(* statusCodeError ); ok {
373
373
// TODO: change error type, because jsonmessage.JSONError assumes HTTP
0 commit comments