From 9123c75142824aaa94f60e07d4cc651c1e90539c Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Fri, 23 Apr 2021 11:54:42 +0200 Subject: [PATCH] On default context, "compose" is implemented by CLI Plugin Signed-off-by: Nicolas De Loof --- cli/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/main.go b/cli/main.go index 6b49bba7c..3057c9066 100644 --- a/cli/main.go +++ b/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) }