fix: do not ask for confirmation right after prompting for input

secret set, variable set, team create, webhook create and admin user
create asked a confirmation that defaults to No right after the user
typed the missing values, so pressing Enter discarded the input. They
now submit what the user entered; deletions still confirm.

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-11 21:59:18 +02:00
1 parent fcfc497a77
commit b6b3ddc91b
6 files changed
+43 -29

No files matched your search

+1 -8
View File
@@ -61,7 +61,6 @@ func (a *application) teamCommand() *cobra.Command {
command.RunE = func(cmd *cobra.Command, args []string) error {
var id int64
var err error
prompted := false
opts := services.TeamOptions{}
if verb != "create" {
id, err = number(args[0])
@@ -85,8 +84,7 @@ func (a *application) teamCommand() *cobra.Command {
}
}
if verb == "create" {
prompted, err = a.require(cmd, &name, "name")
if err != nil {
if _, err := a.require(cmd, &name, "name"); err != nil {
return err
}
opts.Name = &name
@@ -131,11 +129,6 @@ func (a *application) teamCommand() *cobra.Command {
return err
}
service := services.Teams{Client: target.client}
if prompted {
if err := a.confirm(cmd, "create team "+name+" in "+args[0]+" on "+target.Host); err != nil {
return err
}
}
var item services.Team
switch verb {
case "view":