diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-10-17 15:25:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-17 22:25:22 +0000 |
commit | 50724d014ad6923e228e488648d40ce6f00297e9 (patch) | |
tree | 0593ce89f7b0e0b1c563b23214670b6e1993279f /cli/tools/registry/pm/cache_deps.rs | |
parent | 2435a361c64fc9bac4aee7b268b4c0a42eee4471 (diff) |
fix(install): don't attempt to cache specifiers that point to directories (#26369)
Fixes https://github.com/denoland/deno/issues/26162
Diffstat (limited to 'cli/tools/registry/pm/cache_deps.rs')
-rw-r--r-- | cli/tools/registry/pm/cache_deps.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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()); } } |