From 237c0b7f026edfde9e44a187b58be55bdfae8790 Mon Sep 17 00:00:00 2001 From: Cyra Date: Sun, 29 Mar 2026 19:32:09 -0700 Subject: [PATCH] fix(forgejo-runner): only validate required vars when truly non-interactive Check for missing token/URL only when mode is set AND there's no TTY, so mode=default with a terminal still allows interactive prompts inside the container. --- ct/forgejo-runner.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/forgejo-runner.sh b/ct/forgejo-runner.sh index 06f2b3f4..85faf97c 100644 --- a/ct/forgejo-runner.sh +++ b/ct/forgejo-runner.sh @@ -63,7 +63,8 @@ function update_script() { } # Fail early if running unattended without required values -if [[ -n "${mode:-}" ]]; then +# Only check when there's no TTY (truly non-interactive, e.g. piped or scripted) +if [[ -n "${mode:-}" && ! -t 0 ]]; then if [[ -z "${var_forgejo_instance:-}" ]]; then msg_error "var_forgejo_instance is required for unattended installs." exit 1