From 238cb5d80dbf67ca8a693651ad9c8d573c33ed5c Mon Sep 17 00:00:00 2001 From: Mariusz Nowak Date: Fri, 31 May 2019 11:36:23 +0200 Subject: [PATCH] fix: ensure to reread package.json after pull Dependencies were installed for not up to date packageJson shape --- lib/private/install-maintained-package/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/install-maintained-package/index.js b/lib/private/install-maintained-package/index.js index 4721dcb..a543650 100644 --- a/lib/private/install-maintained-package/index.js +++ b/lib/private/install-maintained-package/index.js @@ -43,6 +43,10 @@ module.exports = async (packageContext, userConfiguration, inputOptions, progres // Ensure repository is up to date packageContext.installationJobs = await setupRepository(path, meta.repoUrl, inputOptions); + if (packageContext.installationJobs.has("pull")) { + // Refresh after update + packageContext.packageJson = getPackageJson(path); + } // Cleanup outcome of eventual previous npm crashes await cleanupNpmInstall(packageContext);