File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,21 @@ function prompt_for_telemetry() {
385
385
fi
386
386
}
387
387
388
+ function confirm_for_uninstall() {
389
+ while true
390
+ do
391
+ echo
392
+ read -p " Are you sure you want to uninstall Cortex? Your cluster will be spun down and all resources will be deleted. [Y/n] " -n 1 -r
393
+ echo
394
+ if [[ $REPLY =~ ^[Yy]$ ]]; then
395
+ break
396
+ elif [[ $REPLY =~ ^[Nn]$ ]]; then
397
+ exit 0
398
+ fi
399
+ echo " Unexpected value: $REPLY . Please enter \" Y\" or \" n\" "
400
+ done
401
+ }
402
+
388
403
# ###########
389
404
# ## HELP ###
390
405
# ###########
@@ -448,7 +463,7 @@ elif [ "$arg1" = "uninstall" ]; then
448
463
show_help
449
464
exit 1
450
465
elif [ " $arg2 " = " " ]; then
451
- uninstall_eks
466
+ confirm_for_uninstall && uninstall_eks
452
467
elif [ " $arg2 " = " cli" ]; then
453
468
uninstall_cli
454
469
elif [ " $arg2 " = " " ]; then
You can’t perform that action at this time.
0 commit comments