diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2021-11-24 15:14:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 15:14:19 -0500 |
commit | adc5974333174bd59796f5b7bb8b010c17479dd0 (patch) | |
tree | 969e9ec5e1bdd2f037ad87a283858306bf2a18d2 /cli/main.rs | |
parent | 88000b5feb531fc3969bfa8d60faec0f204cc659 (diff) |
fix(lsp): lsp should respect include/exclude files in format config (#12876)
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cli/main.rs b/cli/main.rs index 87fe28461..e2ef26cd3 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -217,7 +217,7 @@ pub fn create_main_worker( } } else if let Some(config_file) = &ps.maybe_config_file { // otherwise we will use the path to the config file - config_file.path.to_str().map(|s| s.to_string()) + Some(config_file.specifier.to_string()) } else { // otherwise we will use the path to the main module Some(main_module.to_string()) @@ -724,10 +724,8 @@ async fn create_graph_and_maybe_check( if let Some(ignored_options) = maybe_ignored_options { eprintln!("{}", ignored_options); } - let maybe_config_specifier = ps - .maybe_config_file - .as_ref() - .map(|cf| ModuleSpecifier::from_file_path(&cf.path).unwrap()); + let maybe_config_specifier = + ps.maybe_config_file.as_ref().map(|cf| cf.specifier.clone()); let check_result = emit::check_and_maybe_emit( graph.clone(), &mut cache, |