Compare commits

...

3 Commits

Author SHA1 Message Date
Khải
c7a612c565
Merge 4b568c8023 into 62bce64275 2026-03-25 13:58:38 -04:00
Zoltan Kochan
62bce64275
fix: extract pnpm version from packageManager field instead of returning undefined (#216)
When packageManager is set to e.g. "pnpm@9.1.0+sha...", strip the
"pnpm@" prefix and any "+sha..." hash suffix so the action installs
the correct version. Previously returning undefined caused failures
on Windows.
2026-03-25 13:59:54 +01:00
Khải
4b568c8023
docs: remove v2 warning
@zkochan If you have tested that it work with newer Node.js versions, this warning can be removed.
2024-07-05 21:52:13 +07:00
3 changed files with 2 additions and 6 deletions

View File

@ -1,7 +1,3 @@
> ## :warning: Upgrade from v2!
>
> The v2 version of this action [has stopped working](https://github.com/pnpm/action-setup/issues/135) with newer Node.js versions. Please, upgrade to the latest version to fix any issues.
# Setup pnpm
Install pnpm package manager.

BIN
dist/index.js vendored

Binary file not shown.

View File

@ -101,8 +101,8 @@ Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_
}
if (typeof packageManager === 'string' && packageManager.startsWith('pnpm@')) {
// pnpm will handle version management via packageManager field
return undefined
// Strip the "pnpm@" prefix and any "+sha..." hash suffix
return packageManager.replace('pnpm@', '').replace(/\+.*$/, '')
}
if (!GITHUB_WORKSPACE) {