From cc181ef793cf421233f77e962bcf21ed0a766b1e Mon Sep 17 00:00:00 2001 From: stubbsta Date: Mon, 8 Dec 2025 16:27:41 +0200 Subject: [PATCH] Add to github path --- scripts/install_pnpm.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/install_pnpm.sh b/scripts/install_pnpm.sh index 0c038fcf7..34c873af2 100755 --- a/scripts/install_pnpm.sh +++ b/scripts/install_pnpm.sh @@ -26,9 +26,17 @@ else curl -fsSL https://get.pnpm.io/install.sh | sh - fi - # Source bashrc to load pnpm configuration - if [ -f "$HOME/.bashrc" ]; then - source "$HOME/.bashrc" + # Set PNPM_HOME and add to PATH (same as what the installer adds to .bashrc) + export PNPM_HOME="$HOME/.local/share/pnpm" + case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; + esac + + # If running in GitHub Actions, persist the PATH change + if [ -n "$GITHUB_PATH" ]; then + echo "$PNPM_HOME" >> "$GITHUB_PATH" + echo "Added $PNPM_HOME to GITHUB_PATH" fi # Verify pnpm was installed