fix: update capacity validation to default to 1 if empty in preflight checks
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user