fix: always import the package from the store

This commit is contained in:
Zoltan Kochan
2020-09-17 04:01:46 +03:00
parent fde2b77a8d
commit 7f74cd173f
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/package-store": patch
---
Fixing a regression. Package should be imported when import method is being identified.

View File

@@ -75,7 +75,7 @@ function createAutoImporter (): ImportFunction {
// We still choose hard linking that will fall back to copying in edge cases.
packageImportMethodLogger.debug({ method: 'hardlink' })
auto = hardlinkPkg.bind(null, linkOrCopy)
return 'hardlink'
return auto(to, opts)
}
if (!err.message.startsWith('EXDEV: cross-device link not permitted')) throw err
globalWarn(err.message)