From 2def17a3b625b92b40c6185ff4b47e8ed006492c Mon Sep 17 00:00:00 2001 From: Jacob Yacovelli Date: Wed, 15 Sep 2021 10:42:35 -0400 Subject: [PATCH] fix(install): use configured registry when checking manifest PR-URL: https://github.com/npm/cli/pull/3760 Credit: @yacoman89 Close: #3760 Reviewed-by: @wraithgar --- lib/install.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/install.js b/lib/install.js index 1589ff589c38e..99f75b71384fa 100644 --- a/lib/install.js +++ b/lib/install.js @@ -135,7 +135,8 @@ class Install extends ArboristWorkspaceCmd { // be very strict about engines when trying to update npm itself const npmInstall = args.find(arg => arg.startsWith('npm@') || arg === 'npm') if (isGlobalInstall && npmInstall) { - const npmManifest = await pacote.manifest(npmInstall) + const npmOptions = this.npm.flatOptions + const npmManifest = await pacote.manifest(npmInstall, npmOptions) try { checks.checkEngine(npmManifest, npmManifest.version, process.version) } catch (e) {