Skip to content

Commit

Permalink
Add more elaborate error message
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Jan 15, 2025
1 parent 14a710f commit da9324d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions wireguard-go-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,15 @@ fn build_shared_maybenot_lib(out_dir: impl AsRef<Path>) -> anyhow::Result<()> {
("maybenot_ffi.dll", "maybenot_ffi.dll"),
("maybenot_ffi.dll.lib", "maybenot.lib"),
] {
let src = artifacts_dir.join(src_filename);
let dest = out_dir.as_ref().join(dest_filename);
fs::copy(artifacts_dir.join(src_filename), &dest)
.with_context(|| format!("Failed to copy {src_filename}"))?;
fs::copy(&src, &dest).with_context(|| {
format!(
"Failed to copy {src} to {dest}",
src = src.to_str().unwrap(),
dest = dest.to_str().unwrap()
)
})?;
}

Ok(())
Expand Down

0 comments on commit da9324d

Please sign in to comment.