mirror of
https://code.forgejo.org/pnpm/action-setup.git
synced 2025-05-19 12:54:45 +00:00
fix: not allow install multiple package manager (#161)
Some checks failed
Test Action / Test with default inputs (push) Has been cancelled
Test Action / Test with dest (push) Has been cancelled
Test Action / Test with standalone (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
Some checks failed
Test Action / Test with default inputs (push) Has been cancelled
Test Action / Test with dest (push) Has been cancelled
Test Action / Test with standalone (push) Has been cancelled
Test Action / Test with run_install (array, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (global, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (null, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, macos-latest) (push) Has been cancelled
Test Action / Test with run_install (array, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (global, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (null, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, ubuntu-latest) (push) Has been cancelled
Test Action / Test with run_install (array, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (empty object, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (global, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (null, windows-latest) (push) Has been cancelled
Test Action / Test with run_install (recursive, windows-latest) (push) Has been cancelled
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>
This commit is contained in:
parent
a7487c7e89
commit
d648c2dd06
1 changed files with 1 additions and 0 deletions
|
@ -64,6 +64,7 @@ async function readTarget(opts: {
|
||||||
if (version) {
|
if (version) {
|
||||||
if (
|
if (
|
||||||
typeof packageManager === 'string' &&
|
typeof packageManager === 'string' &&
|
||||||
|
packageManager.startsWith('pnpm@') &&
|
||||||
packageManager.replace('pnpm@', '') !== version
|
packageManager.replace('pnpm@', '') !== version
|
||||||
) {
|
) {
|
||||||
throw new Error(`Multiple versions of pnpm specified:
|
throw new Error(`Multiple versions of pnpm specified:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue