chore: remove the double confirmation when creating an organization via the CLI (#16972)

Closes
[coder/internal#476](https://github.com/coder/internal/issues/476)
This commit is contained in:
brettkolodny
2025-03-17 17:14:59 -04:00
committed by GitHub
parent 8ca52a835e
commit e85c92e7d5
-13
View File
@@ -8,7 +8,6 @@ import (
"github.com/coder/coder/v2/cli/cliui"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/pretty"
"github.com/coder/serpent"
)
@@ -41,18 +40,6 @@ func (r *RootCmd) createOrganization() *serpent.Command {
return xerrors.Errorf("organization %q already exists", orgName)
}
_, err = cliui.Prompt(inv, cliui.PromptOptions{
Text: fmt.Sprintf("Are you sure you want to create an organization with the name %s?\n%s",
pretty.Sprint(cliui.DefaultStyles.Code, orgName),
pretty.Sprint(cliui.BoldFmt(), "This action is irreversible."),
),
IsConfirm: true,
Default: cliui.ConfirmNo,
})
if err != nil {
return err
}
organization, err := client.CreateOrganization(inv.Context(), codersdk.CreateOrganizationRequest{
Name: orgName,
})