Skip to content

Commit

Permalink
fix(tauri-build): delete existing sidecar file, closes #4134 (#4167)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed May 19, 2022
1 parent b728131 commit a737f25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-sidecar-refresh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-build": patch
---

Delete existing sidecar before copying new one.
3 changes: 3 additions & 0 deletions core/tauri-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ fn copy_binaries<'a>(binaries: ResourcePaths<'a>, target_triple: &str, path: &Pa
.to_string_lossy()
.replace(&format!("-{}", target_triple), ""),
);
if dest.exists() {
std::fs::remove_file(&dest).unwrap();
}
copy_file(&src, &dest)?;
}
Ok(())
Expand Down

0 comments on commit a737f25

Please sign in to comment.