Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions cli/organizationmanage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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,
})
Expand Down
Loading