Skip to content

Commit 590e25f

Browse files
committed
admin/upload-index: Restore "skipping file" output
1 parent d480f3a commit 590e25f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/admin/upload_index.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::admin::dialoguer;
22
use cargo_registry_index::{Repository, RepositoryConfig};
3-
use indicatif::{ProgressBar, ProgressIterator, ProgressStyle};
3+
use indicatif::{ProgressBar, ProgressStyle};
44
use reqwest::blocking::Client;
55

66
use crate::config;
@@ -35,10 +35,11 @@ pub fn run(opts: Opts) -> anyhow::Result<()> {
3535
let pb = ProgressBar::new(files.len() as u64);
3636
pb.set_style(ProgressStyle::with_template("{bar:60} ({pos}/{len}, ETA {eta})").unwrap());
3737

38-
for file in files.iter().progress_with(pb) {
38+
for file in pb.wrap_iter(files.iter()) {
3939
let crate_name = file.file_name().unwrap().to_str().unwrap();
4040
let path = repo.index_file(crate_name);
4141
if !path.exists() {
42+
pb.suspend(|| println!("skipping file `{}`", crate_name));
4243
continue;
4344
}
4445

0 commit comments

Comments
 (0)