diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-06-26 23:17:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 00:17:00 +0200 |
commit | 2a2ff96be13047cb50612fde0f12e5f6df374ad3 (patch) | |
tree | 655ec1d1308db13c1faa917fd02321ee30c85efe /cli/cache/deno_dir.rs | |
parent | 0da01c0ca6b537f74be32126e567bdfc2c73ed16 (diff) |
fix(ext/node): discover .npmrc in user's homedir (#24021)
This commit adds discovery of `.npmrc` files in user's homedir.
This is not a perfect fix as it doesn't merge multiple `.npmrc` files
together as per https://github.com/denoland/deno/issues/23954
but allows to fallback if no `.npmrc` file is discovered in the project
root.
Diffstat (limited to 'cli/cache/deno_dir.rs')
-rw-r--r-- | cli/cache/deno_dir.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/cache/deno_dir.rs b/cli/cache/deno_dir.rs index 00df41c5a..05de1cf7c 100644 --- a/cli/cache/deno_dir.rs +++ b/cli/cache/deno_dir.rs @@ -169,7 +169,7 @@ impl DenoDir { /// To avoid the poorly managed dirs crate #[cfg(not(windows))] -mod dirs { +pub mod dirs { use std::path::PathBuf; pub fn cache_dir() -> Option<PathBuf> { @@ -227,7 +227,7 @@ mod dirs { // https://github.com/dirs-dev/dirs-sys-rs/blob/ec7cee0b3e8685573d847f0a0f60aae3d9e07fa2/src/lib.rs#L140-L164 // MIT license. Copyright (c) 2018-2019 dirs-rs contributors #[cfg(windows)] -mod dirs { +pub mod dirs { use std::ffi::OsString; use std::os::windows::ffi::OsStringExt; use std::path::PathBuf; |