Browse Source

fix combination of --pull always --no-build

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 2 năm trước cách đây
mục cha
commit
ce1ddb6c7e
2 tập tin đã thay đổi với 0 bổ sung12 xóa
  1. 0 10
      cmd/compose/create.go
  2. 0 2
      cmd/compose/up.go

+ 0 - 10
cmd/compose/create.go

@@ -159,16 +159,6 @@ func (opts createOptions) Apply(project *types.Project) error {
 			project.Services[i] = service
 		}
 	}
-	// opts.noBuild, however, means do not perform ANY builds
-	if opts.noBuild {
-		for i, service := range project.Services {
-			service.Build = nil
-			if service.Image == "" {
-				service.Image = api.GetImageNameOrDefault(service, project.Name)
-			}
-			project.Services[i] = service
-		}
-	}
 
 	if err := applyPlatforms(project, true); err != nil {
 		return err

+ 0 - 2
cmd/compose/up.go

@@ -177,8 +177,6 @@ func runUp(
 	}
 
 	var build *api.BuildOptions
-	// this check is technically redundant as createOptions::apply()
-	// already removed all the build sections
 	if !createOptions.noBuild {
 		if createOptions.quietPull {
 			buildOptions.Progress = string(xprogress.QuietMode)