From adc5974333174bd59796f5b7bb8b010c17479dd0 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 24 Nov 2021 15:14:19 -0500 Subject: fix(lsp): lsp should respect include/exclude files in format config (#12876) --- cli/main.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'cli/main.rs') 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, -- cgit v1.2.3