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:
@@ -63,7 +63,8 @@ function update_script() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Fail early if running unattended without required values
|
# 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
|
if [[ -z "${var_forgejo_instance:-}" ]]; then
|
||||||
msg_error "var_forgejo_instance is required for unattended installs."
|
msg_error "var_forgejo_instance is required for unattended installs."
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user