1
0
mirror of https://github.com/pnpm/action-setup.git synced 2026-03-07 08:21:45 +08:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Khải
6f71a44c65
Merge 4b568c8023 into d648c2dd06 2025-04-02 09:58:03 +09:00
Kevin Cui
d648c2dd06
fix: not allow install multiple package manager (#161)
When a project has both npm and pnpm, using pnpm/action-setup will result in an error: `Multiple versions of pnpm specified`.

The previous implementation was only meant to avoid the "ERR_PNPM_BAD_PM_VERSION" error, but it did not take into account the situation of multiple different package managers.

Signed-off-by: Kevin Cui <bh@bugs.cc>
2025-03-28 08:37:14 +08: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
2 changed files with 1 additions and 4 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.

View File

@ -64,6 +64,7 @@ async function readTarget(opts: {
if (version) {
if (
typeof packageManager === 'string' &&
packageManager.startsWith('pnpm@') &&
packageManager.replace('pnpm@', '') !== version
) {
throw new Error(`Multiple versions of pnpm specified: