From fb95fe9457d4ca83a79ad562ed43d4bba463e5a1 Mon Sep 17 00:00:00 2001 From: Cyra Date: Sun, 29 Mar 2026 19:30:19 -0700 Subject: [PATCH] fix(forgejo-runner): fail early when token missing in unattended mode Abort before build_container if mode is set (unattended) but no runner registration token was provided. Avoids a 20+ minute container build only to fail at the registration step. --- ct/forgejo-runner.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ct/forgejo-runner.sh b/ct/forgejo-runner.sh index 19aaabfe..0c0fd8aa 100644 --- a/ct/forgejo-runner.sh +++ b/ct/forgejo-runner.sh @@ -62,6 +62,12 @@ function update_script() { exit } +# Fail early if running unattended without a runner token +if [[ -n "${mode:-}" && -z "${var_forgejo_runner_token:-}" ]]; then + msg_error "var_forgejo_runner_token is required for unattended installs." + exit 1 +fi + start build_container description