This commit is contained in:
Hector Castejon Diaz 2024-11-14 14:12:30 +01:00
parent c83ade86af
commit 9ffe4984c5
No known key found for this signature in database
GPG Key ID: 75B70C938163F1D1
1 changed files with 2 additions and 7 deletions

View File

@ -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 {