mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
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:
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user