From 9ffe4984c59f00d568162504128e4abd7341ede7 Mon Sep 17 00:00:00 2001 From: Hector Castejon Diaz Date: Thu, 14 Nov 2024 14:12:30 +0100 Subject: [PATCH] WIP --- cmd/workspace/apps/apps.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cmd/workspace/apps/apps.go b/cmd/workspace/apps/apps.go index bf6689ca..282abb99 100755 --- a/cmd/workspace/apps/apps.go +++ b/cmd/workspace/apps/apps.go @@ -918,22 +918,20 @@ func newUpdate() *cobra.Command { // TODO: complex arg: app - cmd.Use = "update NAME NAME" + cmd.Use = "update NAME" cmd.Short = `Update an app.` cmd.Long = `Update an app. Updates the app with the supplied name. Arguments: - NAME: The name of the app. The name must contain only lowercase alphanumeric - characters and hyphens. It must be unique within the workspace. NAME: The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It must be unique within the workspace.` cmd.Annotations = make(map[string]string) cmd.Args = func(cmd *cobra.Command, args []string) error { - check := root.ExactArgs(2) + check := root.ExactArgs(1) return check(cmd, args) } @@ -955,9 +953,6 @@ func newUpdate() *cobra.Command { } } updateReq.Name = args[0] - if !cmd.Flags().Changed("json") { - updateReq.Name = args[1] - } response, err := w.Apps.Update(ctx, updateReq) if err != nil {