From e997c6ba10ae8b328ef50c79f2a97b61f5ba8291 Mon Sep 17 00:00:00 2001 From: Anton Patsev Date: Thu, 7 May 2026 16:15:25 +0600 Subject: [PATCH] fix: don't print confirmation prompt when skip-confirm is set Move fmt.Printf() after the skip check in util.Confirm() so that the prompt text is not printed to stdout when --skip-confirm flag is used. This fixes the issue where Kubernetes Jobs would hang because the prompt output made it appear the process was waiting for input. Fixes #259 --- pkg/util/confirm.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/confirm.go b/pkg/util/confirm.go index 101d5435..5137ba8a 100644 --- a/pkg/util/confirm.go +++ b/pkg/util/confirm.go @@ -10,13 +10,13 @@ import ( // Confirm shows the argument prompt to the user and returns a boolean based on whether or not // the user confirms that it's ok to continue. func Confirm(prompt string, skip bool) (bool, error) { - fmt.Printf("%s (yes/no) ", prompt) - if skip { log.Infof("Automatically answering yes because skip is set to true") return true, nil } + fmt.Printf("%s (yes/no) ", prompt) + var response string _, err := fmt.Scanln(&response) if err != nil {