Merge pull request #7566 from kaovilai/biaOperationErrorsPluginName

Add confirm flag to velero plugin add
This commit is contained in:
Xun Jiang/Bruce Jiang
2024-04-01 12:47:53 +08:00
committed by GitHub
9 changed files with 80 additions and 39 deletions
+2 -1
View File
@@ -32,6 +32,7 @@ import (
"github.com/vmware-tanzu/velero/pkg/client"
"github.com/vmware-tanzu/velero/pkg/cmd"
"github.com/vmware-tanzu/velero/pkg/cmd/cli"
"github.com/vmware-tanzu/velero/pkg/cmd/util/confirm"
"github.com/vmware-tanzu/velero/pkg/label"
)
@@ -70,7 +71,7 @@ func NewDeleteCommand(f client.Factory, use string) *cobra.Command {
// Run performs the delete backup operation.
func Run(o *cli.DeleteOptions) error {
if !o.Confirm && !cli.GetConfirmation() {
if !o.Confirm && !confirm.GetConfirmation() {
// Don't do anything unless we get confirmation
return nil
}