fix(tauri-build): delete existing sidecar file, closes #4134 (#4167)

This commit is contained in:
Lucas Fernandes Nogueira 2022-05-18 18:49:53 -07:00 committed by GitHub
parent b7281317ba
commit a737f25c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-build": patch
---
Delete existing sidecar before copying new one.

View File

@ -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(())