create a better error message when saving fails

This commit is contained in:
Darren Schroeder 2024-07-03 07:31:47 -05:00
parent 0d060aeae8
commit 1027088f93

View File

@ -461,7 +461,7 @@ fn open_file(path: &Path, span: Span, append: bool) -> Result<File, ShellError>
};
file.map_err(|e| ShellError::GenericError {
error: "Permission denied".into(),
error: format!("Problem with [{}], Permission denied", path.display()),
msg: e.to_string(),
span: Some(span),
help: None,