Fix indentation for component-delete `confirm` flag
@@ -80,8 +80,7 @@ func runDelete(cmd *cobra.Command, args []string) {
componentsObjects[i] = compObj
}
- if !confirm {
- if !askForConfirmation(
+ if !confirm && !askForConfirmation(
fmt.Sprintf(
"The following components will be deleted:\n\t%s\n\nAre you sure you want to proceed?",
strings.Join(componentsToDelete, "\n\t"),
@@ -90,7 +89,6 @@ func runDelete(cmd *cobra.Command, args []string) {
contextLogger.Info("Components deletion cancelled.")
return
}
- }
kubeconfig, err := getKubeconfig()
if err != nil {
