From c5e3f43806ff8aa735df51dfe664b08988a62ca3 Mon Sep 17 00:00:00 2001 From: S Date: Mon, 2 Mar 2026 08:12:21 -0500 Subject: [PATCH] fix: update capacity validation to default to 1 if empty in preflight checks --- preflight.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/preflight.sh b/preflight.sh index a9cbb6f..b218807 100755 --- a/preflight.sh +++ b/preflight.sh @@ -165,8 +165,10 @@ check_runners_ini_format() { errors=$((errors + 1)) fi - # capacity: positive integer >= 1 - if [[ -n "$capacity" ]] && ! [[ "$capacity" =~ ^[1-9][0-9]*$ ]]; then + # capacity: positive integer >= 1 (defaults to 1 at runtime if empty) + if [[ -z "$capacity" ]]; then + log_warn " → [$section] capacity is empty (will default to 1 at runtime)" + elif ! [[ "$capacity" =~ ^[1-9][0-9]*$ ]]; then log_error " → [$section] capacity='$capacity' (must be positive integer >= 1)" errors=$((errors + 1)) fi @@ -250,7 +252,7 @@ REQUIRED_VARS=( GITEA_BACKUP_INTERNAL_URL BACKUP_STORAGE_PATH GITHUB_USERNAME GITHUB_TOKEN REPO_NAMES - RUNNER_DEFAULT_IMAGE RUNNER_DATA_BASE_PATH LOCAL_RUNNER_DATA_BASE_PATH + RUNNER_DEFAULT_IMAGE TLS_MODE CADDY_DOMAIN CADDY_DATA_PATH )