mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-14 11:35:56 -04:00
fix: don't fail if the file already exists (Windows Reflinks) (#7555)
close #7554
This commit is contained in:
6
.changeset/tough-hounds-laugh.md
Normal file
6
.changeset/tough-hounds-laugh.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/fs.indexed-pkg-importer": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
Don't fail in Windows CoW if the file already exists [#7554](https://github.com/pnpm/pnpm/issues/7554).
|
||||
@@ -136,7 +136,7 @@ function createCloneFunction (): CloneFunction {
|
||||
// If the file already exists, then we just proceed.
|
||||
// This will probably only happen if the package's index file contains the same file twice.
|
||||
// For instance: { "index.js": "hash", "./index.js": "hash" }
|
||||
if (!err.message.startsWith('File exists')) throw err
|
||||
if (!err.message.startsWith('File exists') && !err.message.includes('-2147024816')) throw err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user