Skip to content

Commit 5a87477

Browse files
committed
add assume check to update volumen backup
1 parent e62bfca commit 5a87477

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

internal/cmd/volume/backup/update/update.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ func NewCmd(params *params.CmdParams) *cobra.Command {
5454
return err
5555
}
5656

57+
if !model.AssumeYes {
58+
prompt := fmt.Sprintf("Are you sure you want to update backup %q? (This cannot be undone)", model.BackupId)
59+
err = params.Printer.PromptForConfirmation(prompt)
60+
if err != nil {
61+
return err
62+
}
63+
}
64+
5765
// Configure API client
5866
apiClient, err := client.ConfigureClient(params.Printer, params.CliVersion)
5967
if err != nil {

0 commit comments

Comments
 (0)