Add confirm flag to velero plugin add

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
This commit is contained in:
Tiger Kaovilai
2024-03-26 05:56:11 +07:00
parent f1f7f04233
commit 3c243653c4
9 changed files with 80 additions and 39 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ import (
velerov2alpha1api "github.com/vmware-tanzu/velero/pkg/apis/velero/v2alpha1"
"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/controller"
"github.com/vmware-tanzu/velero/pkg/install"
kubeutil "github.com/vmware-tanzu/velero/pkg/util/kube"
@@ -88,7 +88,7 @@ Use '--force' to skip the prompt confirming if you want to uninstall Velero.
// Confirm if not asked to force-skip confirmation
if !o.force {
fmt.Println("You are about to uninstall Velero.")
if !cli.GetConfirmation() {
if !confirm.GetConfirmation() {
// Don't do anything unless we get confirmation
return
}