Skip to content

Commit 4115d18

Browse files
author
Yago Carlos Fernandez Gou
committed
Move from assume yes to prompt for confirmation
1 parent 6a1b15d commit 4115d18

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

internal/cmd/beta/intake/instance/create/create.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,10 @@ func NewCmd(p *types.CmdParams) *cobra.Command {
9696
projectLabel = model.ProjectId
9797
}
9898

99-
if !model.AssumeYes {
100-
prompt := fmt.Sprintf("Are you sure you want to create an Intake for project %q?", projectLabel)
101-
err = p.Printer.PromptForConfirmation(prompt)
102-
if err != nil {
103-
return err
104-
}
99+
prompt := fmt.Sprintf("Are you sure you want to create an Intake for project %q?", projectLabel)
100+
err = p.Printer.PromptForConfirmation(prompt)
101+
if err != nil {
102+
return err
105103
}
106104

107105
// Call API

internal/cmd/beta/intake/instance/delete/delete.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ func NewCmd(p *types.CmdParams) *cobra.Command {
5454
return err
5555
}
5656

57-
if !model.AssumeYes {
58-
prompt := fmt.Sprintf("Are you sure you want to delete Intake %q?", model.IntakeId)
59-
err = p.Printer.PromptForConfirmation(prompt)
60-
if err != nil {
61-
return err
62-
}
57+
prompt := fmt.Sprintf("Are you sure you want to delete an Intake %q?", model.IntakeId)
58+
err = p.Printer.PromptForConfirmation(prompt)
59+
if err != nil {
60+
return err
6361
}
6462

6563
// Call API

0 commit comments

Comments
 (0)