From cc7862bbb8fc3da05bd50659999e22e671d4097e Mon Sep 17 00:00:00 2001 From: Alex Collins Date: Fri, 9 Aug 2019 13:26:37 -0700 Subject: [PATCH] Minor CLI bug fixes (#2132) --- cmd/argocd/commands/app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index de3b5a3e7a..335c8dd801 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -772,7 +772,7 @@ func NewApplicationDiffCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co Short: shortDesc, Long: shortDesc + "\nUses 'diff' to render the difference. KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff tool.\nReturns the following exit codes: 2 on general errors, 1 when a diff is found, and 0 when no diff is found", Run: func(c *cobra.Command, args []string) { - if len(args) == 0 { + if len(args) != 1 { c.HelpFunc()(c, args) os.Exit(2) } @@ -1241,7 +1241,7 @@ func NewApplicationSyncCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co var localObjsStrings []string if local != "" { app, err := appIf.Get(context.Background(), &applicationpkg.ApplicationQuery{Name: &appName}) - + errors.CheckError(err) if app.Spec.SyncPolicy != nil && app.Spec.SyncPolicy.Automated != nil { log.Fatal("Cannot use local sync when Automatic Sync Policy is enabled") }