fix(ci): call tsx directly in config-options checks

The Linux CI run on 4846970 fails in openclaw-config-options with exit
127 because the check expects ./node_modules/.bin/tsx, but that shim is
not present in the current install layout.

Call the tsx CLI through node via ./node_modules/tsx/dist/cli.mjs so the
check uses the installed package directly instead of a fragile .bin path.

Tests:
- sh -n nix/scripts/config-options-check.sh
- verified remote failure in CI run 24206239018: ./node_modules/.bin/tsx not found
This commit is contained in:
joshp123 2026-04-09 21:55:14 +02:00
parent 48469703d3
commit 555470b594

View File

@ -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"