Skip to content

Commit

Permalink
chore: fix wrong count of output paths
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula committed Sep 22, 2023
1 parent 182ac2e commit 6ebe583
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/packager/src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,20 @@ fn run(cli: Cli) -> Result<()> {
outputs.extend(packages);
}

// flatten paths
let outputs = outputs
.into_iter()
.map(|o| o.paths)
.flatten()
.collect::<Vec<_>>();

// print information when finished
let len = outputs.len();
if len >= 1 {
let pluralised = if len == 1 { "package" } else { "packages" };
let mut printable_paths = String::new();
for p in outputs {
for path in &p.paths {
for path in &p {
writeln!(printable_paths, " {}", util::display_path(path)).unwrap();
}
}
Expand Down

0 comments on commit 6ebe583

Please sign in to comment.