Skip to content

Commit

Permalink
Adds the specific path that caused a failure
Browse files Browse the repository at this point in the history
  • Loading branch information
scottopell committed Mar 5, 2024
1 parent c620cb4 commit 38957ac
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lading/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ pub(crate) fn stdio(behavior: &Behavior) -> Stdio {
match behavior {
Behavior::Quiet => Stdio::null(),
Behavior::Log(path) => {
let fp = fs::File::create(path).expect("Full directory path does not exist");
let fp = fs::File::create(path).unwrap_or_else(|_| {
panic!(
"Full directory path does not exist: {path}",
path = path.display()
);
});
Stdio::from(fp)
}
}
Expand Down

0 comments on commit 38957ac

Please sign in to comment.