show the whole path in "missing mod.nu" errors (#10416)

This commit is contained in:
Antoine Stevan
2023-09-23 15:30:03 +02:00
committed by GitHub
parent b6d31e0e45
commit 6a2fd91a01
2 changed files with 10 additions and 4 deletions

View File

@ -1943,7 +1943,10 @@ pub fn parse_module_file_or_dir(
let mod_nu_path = module_path.clone().join("mod.nu");
if !(mod_nu_path.exists() && mod_nu_path.is_file()) {
working_set.error(ParseError::ModuleMissingModNuFile(path_span));
working_set.error(ParseError::ModuleMissingModNuFile(
module_path.path().to_string_lossy().to_string(),
path_span,
));
return None;
}