0
0
Fork 0
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:
Leo Kettmeir 2025-02-20 04:29:11 +01:00 committed by GitHub
parent 08f5e797b6
commit 64abe902e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -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()])
}

View file

@ -0,0 +1,5 @@
{
"args": "run //",
"exitCode": 1,
"output": "error: [WILDCARD]"
}