summaryrefslogtreecommitdiff
path: root/cli/npm/cache.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/npm/cache.rs')
-rw-r--r--cli/npm/cache.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs
index 9f58bcd0d..1bc2f8487 100644
--- a/cli/npm/cache.rs
+++ b/cli/npm/cache.rs
@@ -179,6 +179,10 @@ impl ReadonlyNpmCache {
Self::new(dir.npm_folder_path())
}
+ pub fn root_dir_url(&self) -> &Url {
+ &self.root_dir_url
+ }
+
pub fn package_folder_for_id(
&self,
folder_id: &NpmPackageCacheFolderId,
@@ -345,6 +349,10 @@ impl NpmCache {
&self.cache_setting
}
+ pub fn root_dir_url(&self) -> &Url {
+ self.readonly.root_dir_url()
+ }
+
/// Checks if the cache should be used for the provided name and version.
/// NOTE: Subsequent calls for the same package will always return `true`
/// to ensure a package is only downloaded once per run of the CLI. This