yesod-mirror/tools/pnpm_runner.sh
Copybara 8157b39ea4
Some checks failed
CI / build (push) Failing after 12s
Project import generated by Copybara.
GitOrigin-RevId: 6370f6ea785709295b6abcf9c60717cacf3ac432
2026-01-20 21:26:21 +00:00

20 lines
No EOL
465 B
Bash
Executable file

#!/bin/bash
set -e
# Find the pnpm binary in the runfiles.
# Use -L to follow symlinks.
PNPM=$(find -L "$0.runfiles" -type f -path "*/file/pnpm" | head -n 1)
if [ -z "$PNPM" ]; then
echo "Error: Could not find pnpm binary in runfiles."
exit 1
fi
chmod +x "$PNPM"
# If running via 'bazel run', switch to the workspace directory to modify source files.
if [ -n "$BUILD_WORKSPACE_DIRECTORY" ]; then
cd "$BUILD_WORKSPACE_DIRECTORY"
fi
exec "$PNPM" "$@"