mirror of
https://github.com/pnpm/action-setup
synced 2026-11-09 05:37:57 +01:00
## Summary - Export `pnpm_config_pm_on_fail=download` from the action so the bootstrap pnpm switches versions via `manage-package-manager-versions` instead of throwing `BAD_PM_VERSION` when a project pins `devEngines.packageManager.onFail = "error"` without supplying a `version:` input. - Adds a `test_dev_engines_on_fail_error` workflow job (Linux/macOS/Windows, exact + range) that reproduces #252. Fixes #252.
This commit is contained in:
1 parent
91ab88e261
commit
1155470f3e
3 files changed
+205
-311
No files matched your search
@@ -102,7 +102,12 @@ export async function runSelfInstaller(inputs: Inputs): Promise<SelfInstallerRes
|
||||
}
|
||||
|
||||
// No explicit target version: rely on the bootstrap pnpm to switch to
|
||||
// the version declared in packageManager/devEngines at runtime.
|
||||
// the version declared in packageManager/devEngines at runtime. Force
|
||||
// `pmOnFail=download` so a project that pins
|
||||
// `devEngines.packageManager.onFail = "error"` doesn't trip BAD_PM_VERSION
|
||||
// before the switch can happen (issue #252). Scoped to this branch so users
|
||||
// who pass an explicit `version:` input keep strict onFail behavior.
|
||||
exportVariable('pnpm_config_pm_on_fail', 'download')
|
||||
return { exitCode: 0, binDest: pnpmHome }
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user