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.
This commit is contained in:
Cyra
2026-03-29 19:32:09 -07:00
parent 82ea3f24f1
commit 237c0b7f02

View File

@@ -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