Skip to content

Commit

Permalink
Merge pull request #459 from itowlson/fail-push-if-bindle-id-exists
Browse files Browse the repository at this point in the history
Check if bindle already exists before pushing
  • Loading branch information
itowlson authored May 10, 2022
2 parents 95f9da2 + 2136dd6 commit b4aa7aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/publish/src/bindle_pusher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ pub async fn push_all(
&bindle_connection_info.base_url
)
})?;

if client.get_yanked_invoice(bindle_id).await.is_ok() {
anyhow::bail!("Bindle {} already exists on the server", bindle_id);
}

reader
.push(client)
.await
Expand Down

0 comments on commit b4aa7aa

Please sign in to comment.