fix(packaging): drop broken pnpm prune symlinks

pnpm prune --prod on the v2026.4.8 recovery line leaves orphaned
.bin/node-which symlinks under cmake-js and node-llama-cpp.
The install-phase symlink validation then fails on Darwin before CI can
prove the release pin.

Delete only broken symlinks after prune so validation stays strict while
the packaged tree becomes installable again.

Tests:
- sh -n nix/scripts/gateway-build.sh
- nix build .#openclaw-gateway --accept-flake-config -L
- nix build .#checks.aarch64-darwin.ci --accept-flake-config -L
This commit is contained in:
joshp123 2026-04-09 20:18:54 +02:00
parent 3d5a30eab4
commit 48469703d3

View File

@ -93,3 +93,7 @@ log_step "pnpm prune --prod" env CI=true pnpm prune --prod
# Reduce output size (pnpm implementation detail; safe to remove)
rm -rf node_modules/.pnpm/node_modules
# pnpm prune can leave orphaned .bin links behind for removed prod deps.
# Keep install-phase symlink validation strict by dropping only broken links here.
find node_modules -xtype l -delete