mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -05:00
fix: don't panic when running with // as a filepath (#28189)
Fixes #28128
This commit is contained in:
parent
08f5e797b6
commit
64abe902e5
2 changed files with 6 additions and 1 deletions
|
@ -1006,7 +1006,7 @@ impl Flags {
|
|||
|| module_specifier.scheme() == "npm"
|
||||
{
|
||||
if let Ok(p) = url_to_file_path(&module_specifier) {
|
||||
Some(vec![p.parent().unwrap().to_path_buf()])
|
||||
p.parent().map(|parent| vec![parent.to_path_buf()])
|
||||
} else {
|
||||
Some(vec![current_dir.to_path_buf()])
|
||||
}
|
||||
|
|
5
tests/specs/run/with_double_slash/__test__.jsonc
Normal file
5
tests/specs/run/with_double_slash/__test__.jsonc
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"args": "run //",
|
||||
"exitCode": 1,
|
||||
"output": "error: [WILDCARD]"
|
||||
}
|
Loading…
Add table
Reference in a new issue