Skip to content

Commit

Permalink
fix(publish): Actually properly update Index
Browse files Browse the repository at this point in the history
I meant to implement this before reovign the sleep but it fell through
the cracks.

Fixes crate-ci#224
  • Loading branch information
epage committed Oct 10, 2021
1 parent 912db96 commit 832d3f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ pub fn wait_for_publish(
if !dry_run {
let now = std::time::Instant::now();
let sleep_time = std::time::Duration::from_secs(1);
let index = crates_index::Index::new_cargo_default();
let index = crates_index::BareIndex::new_cargo_default();
let mut index = index.open_or_clone()?;
let mut logged = false;
loop {
if let Err(e) = index.update() {
if let Err(e) = index.retrieve() {
log::debug!("Crate index update failed with {}", e);
}
let crate_data = index.crate_(name);
Expand Down
5 changes: 5 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ quick_error! {
source(err)
display("FromUtf8Error {}", err)
}
IndexError(err: crates_index::Error) {
from()
source(err)
display("{}", err)
}
NoPackage {
display("No package in manifest file")
}
Expand Down

0 comments on commit 832d3f8

Please sign in to comment.