Skip to content

Commit 4ddc9fb

Browse files
committed
remove obsolete assumeYes checks
1 parent 11e33d0 commit 4ddc9fb

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,11 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
7676
projectLabel = model.ProjectId
7777
}
7878

79-
if !model.AssumeYes {
80-
prompt := fmt.Sprintf("Are you sure you want to create a Logs instance for project %q?", projectLabel)
81-
err = params.Printer.PromptForConfirmation(prompt)
82-
if err != nil {
83-
return err
84-
}
79+
prompt := fmt.Sprintf("Are you sure you want to create a Logs instance for project %q?", projectLabel)
80+
err = params.Printer.PromptForConfirmation(prompt)
81+
82+
if err != nil {
83+
return err
8584
}
8685

8786
// Call API

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,11 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
6969
instanceLabel = model.InstanceID
7070
}
7171

72-
if !model.AssumeYes {
73-
prompt := fmt.Sprintf("Are you sure you want to delete instance %q from project %q? (This cannot be undone)", instanceLabel, projectLabel)
74-
err = params.Printer.PromptForConfirmation(prompt)
75-
if err != nil {
76-
return err
77-
}
72+
prompt := fmt.Sprintf("Are you sure you want to delete instance %q from project %q? (This cannot be undone)", instanceLabel, projectLabel)
73+
err = params.Printer.PromptForConfirmation(prompt)
74+
75+
if err != nil {
76+
return err
7877
}
7978

8079
// Call API

internal/cmd/beta/logs/instance/update/update.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,11 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
8383
instanceLabel = model.InstanceID
8484
}
8585

86-
if !model.AssumeYes {
87-
prompt := fmt.Sprintf("Are you sure you want to update instance %s?", instanceLabel)
88-
err = params.Printer.PromptForConfirmation(prompt)
89-
if err != nil {
90-
return err
91-
}
86+
prompt := fmt.Sprintf("Are you sure you want to update instance %s?", instanceLabel)
87+
err = params.Printer.PromptForConfirmation(prompt)
88+
89+
if err != nil {
90+
return err
9291
}
9392

9493
// Call API

0 commit comments

Comments
 (0)