mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-04 08:01:02 +08:00
Compare commits
3 Commits
80ef5a4602
...
01b11c325f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
01b11c325f | ||
|
|
e303250a24 | ||
|
|
e2805aa8fd |
@ -80,7 +80,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
version: 9
|
version: 10
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install only pnpm with `packageManager`
|
### Install only pnpm with `packageManager`
|
||||||
@ -116,7 +116,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
version: 9
|
version: 10
|
||||||
run_install: |
|
run_install: |
|
||||||
- recursive: true
|
- recursive: true
|
||||||
args: [--frozen-lockfile, --strict-peer-dependencies]
|
args: [--frozen-lockfile, --strict-peer-dependencies]
|
||||||
@ -141,7 +141,7 @@ jobs:
|
|||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
with:
|
with:
|
||||||
version: 9
|
version: 10
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
|
|||||||
@ -57,16 +57,15 @@ async function readTarget(opts: {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (version) {
|
if (version) {
|
||||||
if (
|
if (typeof packageManager === 'string') {
|
||||||
typeof packageManager === 'string' &&
|
const packageManagerVersion = packageManager.replace('pnpm@', '')
|
||||||
packageManager.replace('pnpm@', '') !== version
|
if(packageManagerVersion !== version && packageManagerVersion !== '*')
|
||||||
) {
|
throw new Error(`Multiple versions of pnpm specified:
|
||||||
throw new Error(`Multiple versions of pnpm specified:
|
- version ${version} in the GitHub Action config with the key "version"
|
||||||
- version ${version} in the GitHub Action config with the key "version"
|
- version ${packageManager} in the package.json with the key "packageManager"
|
||||||
- version ${packageManager} in the package.json with the key "packageManager"
|
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)
|
||||||
Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_PM_VERSION`)
|
return `${ standalone ? '@pnpm/exe' : 'pnpm' }@${packageManagerVersion}`
|
||||||
}
|
}
|
||||||
|
|
||||||
return `${ standalone ? '@pnpm/exe' : 'pnpm' }@${version}`
|
return `${ standalone ? '@pnpm/exe' : 'pnpm' }@${version}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user