Skip to content

Commit

Permalink
add progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDavison committed Jun 7, 2024
1 parent eee14e7 commit 3ba09fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ shellexpand = "3.1.0"
anyhow = "1.0"
structopt = "0.3.26"
rayon = "1.10.0"
indicatif = { version = "0.17.8", features = ["rayon"] }
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use std::fs::read_dir;
use std::path::{Path, PathBuf};
use structopt::StructOpt;
use rayon::prelude::*;
use indicatif::ParallelProgressIterator;

use shellexpand::tilde;

Expand Down Expand Up @@ -109,7 +110,7 @@ fn main() {
.collect::<Vec<String>>(),
);
let mut outs = Vec::new();
let out: Vec<_> = all_repos.par_iter().map(|repo| {
let out: Vec<_> = all_repos.par_iter().progress_count(all_repos.len() as u64).map(|repo| {
cmd(&repo, json)
}).collect();
for output in out {
Expand Down

0 comments on commit 3ba09fa

Please sign in to comment.