kubeadm: too early return for reset with dry-run or force mode

Signed-off-by: Dave Chen <dave.chen@arm.com>
This commit is contained in:
Dave Chen 2022-09-01 16:59:11 +08:00
parent 863a462eec
commit 1bb44a8e78

View File

@ -53,7 +53,9 @@ func runPreflight(c workflow.RunData) error {
if !r.ForceReset() && !r.DryRun() {
klog.Warning("[reset] WARNING: Changes made to this host by 'kubeadm init' or 'kubeadm join' will be reverted.")
return util.InteractivelyConfirmAction("reset", "Are you sure you want to proceed?", r.InputReader())
if err := util.InteractivelyConfirmAction("reset", "Are you sure you want to proceed?", r.InputReader()); err != nil {
return err
}
}
fmt.Println("[preflight] Running pre-flight checks")