mirror of
https://github.com/pnpm/action-setup.git
synced 2026-07-01 17:41:41 +00:00
revert: drop packageManager field self-update change
Keep only the PATH ordering fix from the previous commit. The packageManager field handling is a separate concern and needs more discussion before being bundled with this fix.
This commit is contained in:
parent
d2a862f169
commit
7e7160a946
BIN
dist/index.js
vendored
BIN
dist/index.js
vendored
Binary file not shown.
@ -119,12 +119,9 @@ Remove one of these versions to avoid version mismatch errors like ERR_PNPM_BAD_
|
|||||||
return version
|
return version
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract the version from the packageManager field so self-update
|
// pnpm will automatically download and switch to the right version
|
||||||
// installs it explicitly. Relying on pnpm's auto-switching can cause
|
|
||||||
// the bootstrap version to modify the lockfile when it differs from
|
|
||||||
// the target version.
|
|
||||||
if (typeof packageManager === 'string' && packageManager.startsWith('pnpm@')) {
|
if (typeof packageManager === 'string' && packageManager.startsWith('pnpm@')) {
|
||||||
return packageManager.replace('pnpm@', '').split('+')[0]
|
return undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
if (devEngines?.packageManager?.name === 'pnpm' && devEngines.packageManager.version) {
|
if (devEngines?.packageManager?.name === 'pnpm' && devEngines.packageManager.version) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user