Match versions

This commit is contained in:
Karl Horky 2024-04-19 16:45:24 +02:00 committed by GitHub
parent b036c0dcb9
commit 7ce3debe10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,7 +55,10 @@ async function readTarget(opts: {
} }
if (version) { if (version) {
if (typeof packageManager === 'string') { if (
typeof packageManager === 'string' &&
packageManager.replace('pnpm@', '') !== version
) {
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"