diff options
Diffstat (limited to 'cli/cache/mod.rs')
-rw-r--r-- | cli/cache/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/cache/mod.rs b/cli/cache/mod.rs index 7d95a6423..229a9cb54 100644 --- a/cli/cache/mod.rs +++ b/cli/cache/mod.rs @@ -196,7 +196,9 @@ impl Loader for FetchCacher { ) -> LoadFuture { use deno_graph::source::CacheSetting as LoaderCacheSetting; - if specifier.path().contains("/node_modules/") { + if specifier.scheme() == "file" + && specifier.path().contains("/node_modules/") + { // The specifier might be in a completely different symlinked tree than // what the node_modules url is in (ex. `/my-project-1/node_modules` // symlinked to `/my-project-2/node_modules`), so first we checked if the path |