summaryrefslogtreecommitdiff
path: root/cli/tools
diff options
context:
space:
mode:
authorMarvin Hagemeister <marvin@deno.com>2024-10-24 20:03:56 +0200
committerGitHub <noreply@github.com>2024-10-24 20:03:56 +0200
commit5f0bb3c6f4328003012e98ba70ce18e4e2e842de (patch)
tree5d99b6f2868c70b105ca4ff83f2a7380f4da9ac5 /cli/tools
parentc71e020668b40666aecfdffb1dbf979abcb41958 (diff)
fix: `.npmrc` settings not being passed to install/add command (#26473)
We weren't passing the resolved npmrc settings to the install commands. This lead us to always fall back to the default registry url instead of using the one from npmrc. Fixes https://github.com/denoland/deno/issues/26139 Fixes https://github.com/denoland/deno/issues/26033 Fixes https://github.com/denoland/deno/issues/25924 Fixes https://github.com/denoland/deno/issues/25822 Fixes https://github.com/denoland/deno/issues/26152 --------- Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tools')
-rw-r--r--cli/tools/registry/pm.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/cli/tools/registry/pm.rs b/cli/tools/registry/pm.rs
index 2060b9a13..d1be901d6 100644
--- a/cli/tools/registry/pm.rs
+++ b/cli/tools/registry/pm.rs
@@ -367,10 +367,14 @@ pub async fn add(
Default::default(),
None,
);
+
+ let npmrc = cli_factory.cli_options().unwrap().npmrc();
+
deps_file_fetcher.set_download_log_level(log::Level::Trace);
let deps_file_fetcher = Arc::new(deps_file_fetcher);
let jsr_resolver = Arc::new(JsrFetchResolver::new(deps_file_fetcher.clone()));
- let npm_resolver = Arc::new(NpmFetchResolver::new(deps_file_fetcher));
+ let npm_resolver =
+ Arc::new(NpmFetchResolver::new(deps_file_fetcher, npmrc.clone()));
let mut selected_packages = Vec::with_capacity(add_flags.packages.len());
let mut package_reqs = Vec::with_capacity(add_flags.packages.len());