Skip to content

Commit e7a8748

Browse files
committed
build: use legacy builder for wcow if not opt-in with a builder component
Signed-off-by: CrazyMax <[email protected]>
1 parent e38e6c5 commit e7a8748

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎cmd/docker/builder.go‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ func newBuilderError(warn bool, err error) error {
4141
}
4242

4343
func processBuilder(dockerCli command.Cli, cmd *cobra.Command, args, osargs []string) ([]string, []string, error) {
44-
var useLegacy bool
45-
var useBuilder bool
44+
var useLegacy, useBuilder bool
4645

4746
// check DOCKER_BUILDKIT env var is present and
4847
// if not assume we want to use the builder component
@@ -73,6 +72,12 @@ func processBuilder(dockerCli command.Cli, cmd *cobra.Command, args, osargs []st
7372
return args, osargs, nil
7473
}
7574

75+
// wcow build command must use the legacy builder
76+
// if not opt-in through a builder component
77+
if !useBuilder && dockerCli.ServerInfo().OSType == "windows" {
78+
return args, osargs, nil
79+
}
80+
7681
if useLegacy {
7782
// display warning if not wcow and continue
7883
if dockerCli.ServerInfo().OSType != "windows" {

0 commit comments

Comments
 (0)