fix(forgejo-runner): revert TTY check, gate on mode being explicitly set
mode is only set when the user is automating (e.g. mode=default with var_* overrides). The default bash -c curl invocation leaves mode empty and shows the whiptail menu, so this check won't affect interactive use.
This commit is contained in:
@@ -63,8 +63,9 @@ function update_script() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Fail early if running unattended without required values
|
# Fail early if running unattended without required values
|
||||||
# Only check when there's no TTY (truly non-interactive, e.g. piped or scripted)
|
# mode is only set when the user explicitly passes it (automating);
|
||||||
if [[ -n "${mode:-}" && ! -t 0 ]]; then
|
# bare "bash -c $(curl ...)" leaves mode empty and shows the whiptail menu
|
||||||
|
if [[ -n "${mode:-}" ]]; 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