From 7f74cd173f12e512f64c0c579afa089a31f6ba12 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Thu, 17 Sep 2020 04:01:46 +0300 Subject: [PATCH] fix: always import the package from the store --- .changeset/fluffy-monkeys-change.md | 5 +++++ .../package-store/src/storeController/createImportPackage.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/fluffy-monkeys-change.md diff --git a/.changeset/fluffy-monkeys-change.md b/.changeset/fluffy-monkeys-change.md new file mode 100644 index 0000000000..b7f3681757 --- /dev/null +++ b/.changeset/fluffy-monkeys-change.md @@ -0,0 +1,5 @@ +--- +"@pnpm/package-store": patch +--- + +Fixing a regression. Package should be imported when import method is being identified. diff --git a/packages/package-store/src/storeController/createImportPackage.ts b/packages/package-store/src/storeController/createImportPackage.ts index 6787080fba..32c1a9e9b6 100644 --- a/packages/package-store/src/storeController/createImportPackage.ts +++ b/packages/package-store/src/storeController/createImportPackage.ts @@ -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)