Ver código fonte

On default context, "compose" is implemented by CLI Plugin

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 anos atrás
pai
commit
9123c75142
1 arquivos alterados com 5 adições e 1 exclusões
  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)
 	}