Skip to content

Commit

Permalink
Mention file paths in errors when deailng with assets
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneToIgnore committed Oct 15, 2023
1 parent 67aeb3f commit 2f8be74
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,11 @@ impl Build {
let dst_path = dest_dir.join(asset);
info!("copy {:?} to {:?}", src_path, dst_path);
if let Some(dst_parent) = dst_path.parent() {
fs::create_dir_all(&dst_parent)?;
fs::create_dir_all(&dst_parent)
.with_context(|| format!("creating {dst_parent:?}"))?;
}
fs::copy(&src_path, &dst_path)?;
fs::copy(&src_path, &dst_path)
.with_context(|| format!("copying from {src_path:?} to {dst_path:?}"))?;
}
}
Ok(())
Expand Down

0 comments on commit 2f8be74

Please sign in to comment.