Skip to content

Commit 5b2a646

Browse files
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.
1 parent 37cd6c0 commit 5b2a646

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ct/forgejo-runner.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ function update_script() {
6363
}
6464

6565
# Fail early if running unattended without required values
66-
if [[ -n "${mode:-}" ]]; then
66+
# Only check when there's no TTY (truly non-interactive, e.g. piped or scripted)
67+
if [[ -n "${mode:-}" && ! -t 0 ]]; then
6768
if [[ -z "${var_forgejo_instance:-}" ]]; then
6869
msg_error "var_forgejo_instance is required for unattended installs."
6970
exit 1

0 commit comments

Comments
 (0)