diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-11-23 10:38:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 10:38:11 -0500 |
commit | 51e3db956a5927229e3f46f4eaaf317e935f8f17 (patch) | |
tree | 1af79152c7c1edc2c9bc21e8501aad1ba5d7e426 /cli/lsp/tsc.rs | |
parent | d8afd5683857de83f3cc80c33322df3d65377210 (diff) |
fix(cli): config file should resolve paths relative to the config file (#12867)
* Add `specifier_to_file_path` to support converting a ModuleSpecifier with a unix-style path to a PathBuf on Windows.
Diffstat (limited to 'cli/lsp/tsc.rs')
-rw-r--r-- | cli/lsp/tsc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 9647a79fc..6eaaf7ff5 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -16,6 +16,7 @@ use super::text::LineIndex; use super::urls::INVALID_SPECIFIER; use crate::config_file::TsConfig; +use crate::fs_util::specifier_to_file_path; use crate::tsc; use crate::tsc::ResolveArgs; @@ -1512,7 +1513,7 @@ impl CallHierarchyItem { let use_file_name = self.is_source_file_item(); let maybe_file_path = if uri.scheme() == "file" { - uri.to_file_path().ok() + specifier_to_file_path(&uri).ok() } else { None }; |