fix: add host/type compatibility checks in runners.ini format validation
This commit is contained in:
14
preflight.sh
14
preflight.sh
@@ -149,6 +149,20 @@ check_runners_ini_format() {
|
||||
;;
|
||||
esac
|
||||
|
||||
# host/type compatibility:
|
||||
# - host=local requires type=native
|
||||
# - host=unraid|fedora|custom requires type=docker
|
||||
if [[ "$host" =~ ^(unraid|fedora|local|custom)$ ]] && [[ "$type" =~ ^(docker|native)$ ]]; then
|
||||
if [[ "$host" == "local" ]] && [[ "$type" != "native" ]]; then
|
||||
log_error " → [$section] invalid combo host='$host' type='$type' (host=local requires type=native)"
|
||||
errors=$((errors + 1))
|
||||
fi
|
||||
if [[ "$host" != "local" ]] && [[ "$type" != "docker" ]]; then
|
||||
log_error " → [$section] invalid combo host='$host' type='$type' (host=$host requires type=docker)"
|
||||
errors=$((errors + 1))
|
||||
fi
|
||||
fi
|
||||
|
||||
# data_path: must start with / or ~/
|
||||
# shellcheck disable=SC2088 # tilde intentionally stored as literal string
|
||||
if [[ -z "$data_path" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user