NullVoxPopuli / action-setup-pnpm

Correctly sets up node, pnpm, and cache for fastest possible pnpm installations
MIT License
12 stars 3 forks source link

no-lockfile: true complaining lockfile doesn't exist? #16

Open IgnaceMaes opened 10 months ago

IgnaceMaes commented 10 months ago

Opening an issue here as wyvox/action-setup-pnpm doesn't have an issues section.

My Floating dependencies test in ember-shiki fails with the following error:

Run wyvox/action-setup-pnpm@v2
Run if [ ! -f "package.json" ]; then 
--- Debug ---
inputs.pnpm-version: 
packageManager: 
volta.pnpm: 
--- ----- ---
No pnpm-version override detected
package.json#volta.pnpm was not defined
package.json#packageManager () did not start with 'pnpm' or was not defined.
--
Resolved pnpm @ 8
Run echo "Detected option --no-lockfile. Lockfile will be deleted before install."
Detected option --no-lockfile. Lockfile will be deleted before install.
Run pnpm/action-setup@v2
Running self-installer...
Installation Completed!
Run actions/setup-node@v3
Found in cache @ /opt/hostedtoolcache/node/16.20.2/x64
Environment details
/home/runner/setup-pnpm/node_modules/.bin/pnpm store path --silent
/home/runner/setup-pnpm/node_modules/.bin/store/v3
Error: Dependencies lock file is not found in /home/runner/work/ember-shiki/ember-shiki. Supported file patterns: pnpm-lock.yaml

It seems like after the install there is no generated lockfile? It didn't occur before so I'm quite puzzled what triggered this sudden failure.

NullVoxPopuli commented 10 months ago

Hm, well, the no-lockfile option does delete the lockfile. https://github.com/wyvox/action-setup-pnpm/blob/main/action.yml#L113 It's possible that in a pnpm minor deleting the lockfile is not allowed in ci, and we instead need to use the pnpm flag

If you know the gh secrets to make it behave the same as pnpm-args: --no-lockfile, that'd be better

(Also, i just enabled issues. Apologies!)