pnpm / action-setup

Install pnpm package manager
https://github.com/marketplace/actions/setup-pnpm
MIT License
899 stars 87 forks source link

Example not working on all architecture? #61

Closed melMass closed 1 year ago

melMass commented 1 year ago

Hi,

The sample in the readme works for most platforms but not windows: https://github.com/mtb-tools/vscode-mono-workspace/actions/runs/3269716040

image

This part is the culprit:

- name: Get pnpm store directory
        id: pnpm-cache
        run: |
          echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT 
KSXGitHub commented 1 year ago

Can you help try adding shell: bash to the step. If it works, I'll welcome a pull request.

melMass commented 1 year ago

Thanks, I did try pwsh but not bash! I should have...

I'm preparing a PR right now for the readme.

I basically had two issues:

  1. Shell expansion (your tricks might work, but using gh syntax is safer I guess, we can talk about it in the PR)

  2. Node-GYP is not thread safe, at least on windows, doing this: https://github.com/pnpm/pnpm/issues/2135#issuecomment-1260093143 worked.

melMass commented 1 year ago

Well partly, but I don't think it's related to this issue specifically:

image
melMass commented 1 year ago

Closing in favor of #62