diff --git a/nix/scripts/config-options-check.sh b/nix/scripts/config-options-check.sh index 4257043..22291b6 100755 --- a/nix/scripts/config-options-check.sh +++ b/nix/scripts/config-options-check.sh @@ -42,15 +42,21 @@ fi cp "$CONFIG_OPTIONS_GENERATOR" ./generate-config-options.ts cp "$NODE_ENGINE_CHECK" ./check-node-engine.ts -if [ ! -x "./node_modules/.bin/tsx" ]; then - echo "tsx not found at ./node_modules/.bin/tsx (run gateway-tests-build.sh first)" >&2 +if ! command -v node >/dev/null 2>&1; then + echo "node not found in PATH (run gateway-tests-build.sh first)" >&2 exit 1 fi -./node_modules/.bin/tsx ./check-node-engine.ts --repo . +tsx_cli="./node_modules/tsx/dist/cli.mjs" +if [ ! -f "$tsx_cli" ]; then + echo "tsx CLI not found at $tsx_cli (run gateway-tests-build.sh first)" >&2 + exit 1 +fi + +node "$tsx_cli" ./check-node-engine.ts --repo . output_path="./generated-config-options.nix" -./node_modules/.bin/tsx ./generate-config-options.ts --repo . --out "$output_path" +node "$tsx_cli" ./generate-config-options.ts --repo . --out "$output_path" diff -u "$CONFIG_OPTIONS_GOLDEN" "$output_path"