diff --git a/preflight.sh b/preflight.sh index b218807..bd64815 100755 --- a/preflight.sh +++ b/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