diff --git a/cli/config_file.rs b/cli/config_file.rs index 41d9bbbeca..a7fe7f2dec 100644 --- a/cli/config_file.rs +++ b/cli/config_file.rs @@ -339,6 +339,12 @@ mod tests { assert!(config_file.json.compiler_options.is_some()); } + #[test] + fn include_config_path_on_error() { + let error = ConfigFile::read("404.json").err().unwrap(); + assert!(error.to_string().contains("404.json")); + } + #[test] fn test_json_merge() { let mut value_a = json!({ diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index fcf28dbf70..f9bb52cbeb 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -2,7 +2,6 @@ use deno_core::error::anyhow; use deno_core::error::AnyError; -use deno_core::error::Context; use deno_core::resolve_url; use deno_core::serde::Deserialize; use deno_core::serde::Serialize; @@ -432,8 +431,7 @@ impl Inner { )) }?; - let config_file = ConfigFile::read(config_url.path()) - .context("Failed to load configuration file")?; + let config_file = ConfigFile::read(config_url.path())?; let (value, maybe_ignored_options) = config_file.as_compiler_options()?; tsconfig.merge(&value); self.maybe_config_uri = Some(config_url);