瀏覽代碼

linter

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 3 年之前
父節點
當前提交
500555b834
共有 1 個文件被更改,包括 1 次插入10 次删除
  1. 1 10
      pkg/compose/build_classic.go

+ 1 - 10
pkg/compose/build_classic.go

@@ -143,17 +143,8 @@ func (s *composeService) doBuildClassicSimpleImage(ctx context.Context, options
 		return "", err
 	}
 
-	// if up to this point nothing has set the context then we must have another
-	// way for sending it(streaming) and set the context to the Dockerfile
-	if dockerfileCtx != nil && buildCtx == nil {
-		buildCtx = dockerfileCtx
-	}
-
 	progressOutput := streamformatter.NewProgressOutput(progBuff)
-	var body io.Reader
-	if buildCtx != nil {
-		body = progress.NewProgressReader(buildCtx, progressOutput, 0, "", "Sending build context to Docker daemon")
-	}
+	body := progress.NewProgressReader(buildCtx, progressOutput, 0, "", "Sending build context to Docker daemon")
 
 	configFile := s.configFile()
 	creds, err := configFile.GetAllCredentials()