mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-10 18:18:56 -04:00
fix: don't try to fix a lockfile that did not exist (#6091)
This commit is contained in:
6
.changeset/silver-bananas-lie.md
Normal file
6
.changeset/silver-bananas-lie.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/core": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Don't retry installation if the integrity checksum of a package failed and no lockfile was present.
|
||||
@@ -385,7 +385,11 @@ export async function mutateModules (
|
||||
} catch (error: any) { // eslint-disable-line
|
||||
if (
|
||||
frozenLockfile ||
|
||||
error.code !== 'ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY' && !BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)
|
||||
(
|
||||
error.code !== 'ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY' &&
|
||||
!BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)
|
||||
) ||
|
||||
(!ctx.existsWantedLockfile && !ctx.existsCurrentLockfile)
|
||||
) throw error
|
||||
if (BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) {
|
||||
needsFullResolution = true
|
||||
@@ -1234,7 +1238,10 @@ const installInContext: InstallFunction = async (projects, ctx, opts) => {
|
||||
}
|
||||
return await _installInContext(projects, ctx, opts)
|
||||
} catch (error: any) { // eslint-disable-line
|
||||
if (!BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code)) throw error
|
||||
if (
|
||||
!BROKEN_LOCKFILE_INTEGRITY_ERRORS.has(error.code) ||
|
||||
(!ctx.existsWantedLockfile && !ctx.existsCurrentLockfile)
|
||||
) throw error
|
||||
opts.needsFullResolution = true
|
||||
// Ideally, we would not update but currently there is no other way to redownload the integrity of the package
|
||||
opts.update = true
|
||||
|
||||
Reference in New Issue
Block a user