summaryrefslogtreecommitdiffstats
path: root/src/commands/release.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/release.rs')
-rw-r--r--src/commands/release.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/commands/release.rs b/src/commands/release.rs
index 460fbeb..50d3918 100644
--- a/src/commands/release.rs
+++ b/src/commands/release.rs
@@ -166,6 +166,13 @@ async fn new_release(
}
}
+ if dest_path.exists() {
+ debug!("Removing {} before writing new file to this path", dest_path.display());
+ tokio::fs::remove_file(&dest_path)
+ .await
+ .with_context(|| anyhow!("Removing {} before writing new file to this path", dest_path.display()))?;
+ }
+
// else !dest_path.exists()
tokio::fs::copy(&art_path, &dest_path)
.await