diff --git a/cli/src/main.rs b/cli/src/main.rs index ae9be31b..ecb638f7 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -965,8 +965,11 @@ impl Parse { for path in &paths { let path = Path::new(&path); - let language = - loader.select_language(path, current_dir, self.scope.as_deref())?; + let language = loader + .select_language(path, current_dir, self.scope.as_deref()) + .with_context(|| { + anyhow!("Failed to load langauge for path \"{}\"", path.display()) + })?; parse::parse_file_at_path( &mut parser,