fix: handle specifying an import map in an ancestor dir of deno.json (#23602)

* https://github.com/denoland/deno_config/pull/51

Closes https://github.com/denoland/deno/issues/21440
This commit is contained in:
David Sherret 2024-04-29 14:32:27 -04:00 committed by GitHub
parent e6f4c8f531
commit 4384a126bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 31 additions and 4 deletions

View file

@ -943,7 +943,7 @@ impl CliOptions {
&self,
) -> Result<Option<ModuleSpecifier>, AnyError> {
match self.overrides.import_map_specifier.clone() {
Some(maybe_path) => Ok(maybe_path),
Some(maybe_url) => Ok(maybe_url),
None => resolve_import_map_specifier(
self.flags.import_map_path.as_deref(),
self.maybe_config_file.as_ref(),