mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(install): don't attempt to cache specifiers that point to directories (#26369)
Fixes https://github.com/denoland/deno/issues/26162
This commit is contained in:
parent
2435a361c6
commit
50724d014a
3 changed files with 21 additions and 0 deletions
|
@ -75,6 +75,13 @@ pub async fn cache_top_level_deps(
|
||||||
if entry.key.ends_with('/') && specifier.as_str().ends_with('/') {
|
if entry.key.ends_with('/') && specifier.as_str().ends_with('/') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if specifier.scheme() == "file" {
|
||||||
|
if let Ok(path) = specifier.to_file_path() {
|
||||||
|
if !path.is_file() {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
roots.push(specifier.clone());
|
roots.push(specifier.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
9
tests/specs/install/import_map_with_dir/__test__.jsonc
Normal file
9
tests/specs/install/import_map_with_dir/__test__.jsonc
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"tempDir": true,
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"args": "install",
|
||||||
|
"output": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
5
tests/specs/install/import_map_with_dir/deno.json
Normal file
5
tests/specs/install/import_map_with_dir/deno.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"imports": {
|
||||||
|
"@assets": "./src/assets/"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue