mirror of
https://github.com/pnpm/action-setup.git
synced 2026-05-14 22:33:32 +08: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:
@@ -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