소스 검색

Merge pull request #1588 from ndeloof/prefer_cli_plugin

On default context, "compose" is implemented by CLI Plugin
Guillaume Tardif 4 년 전
부모
커밋
1607370b81
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      cli/main.go

+ 5 - 1
cli/main.go

@@ -218,10 +218,14 @@ func main() {
 
 	root.AddCommand(
 		run.Command(ctype),
-		compose.RootCommand(ctype, service.ComposeService()),
 		volume.Command(ctype),
 	)
 
+	if ctype != store.DefaultContextType {
+		// On default context, "compose" is implemented by CLI Plugin
+		root.AddCommand(compose.RootCommand(ctype, service.ComposeService()))
+	}
+
 	if err = root.ExecuteContext(ctx); err != nil {
 		handleError(ctx, err, ctype, currentContext, cc, root)
 	}