Skip to content

Commit 5dfae68

Browse files
committed
Improve error chain formatting
1 parent 0b8c12f commit 5dfae68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/cargo-util/src/paths.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ pub fn remove_dir_all<P: AsRef<Path>>(p: P) -> Result<()> {
423423
// order to report more detailed errors.
424424
fs::remove_dir_all(p.as_ref()).with_context(|| {
425425
format!(
426-
"failed to remove directory `{}` \n\n---\nPrevious error: {:?}\n---",
426+
"{:?}\n\nError: failed to remove directory `{}`",
427+
prev_err,
427428
p.as_ref().display(),
428-
prev_err
429429
)
430430
})
431431
})

0 commit comments

Comments
 (0)