From 50724d014ad6923e228e488648d40ce6f00297e9 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:25:22 -0700 Subject: fix(install): don't attempt to cache specifiers that point to directories (#26369) Fixes https://github.com/denoland/deno/issues/26162 --- cli/tools/registry/pm/cache_deps.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cli/tools') diff --git a/cli/tools/registry/pm/cache_deps.rs b/cli/tools/registry/pm/cache_deps.rs index c8258e600..b4cd1c253 100644 --- a/cli/tools/registry/pm/cache_deps.rs +++ b/cli/tools/registry/pm/cache_deps.rs @@ -75,6 +75,13 @@ pub async fn cache_top_level_deps( if entry.key.ends_with('/') && specifier.as_str().ends_with('/') { continue; } + if specifier.scheme() == "file" { + if let Ok(path) = specifier.to_file_path() { + if !path.is_file() { + continue; + } + } + } roots.push(specifier.clone()); } } -- cgit v1.2.3