From 6ebe58333901164f98916d98ace2ef41a627d735 Mon Sep 17 00:00:00 2001 From: amr-crabnebula Date: Fri, 22 Sep 2023 03:17:52 +0300 Subject: [PATCH] chore: fix wrong count of output paths --- crates/packager/src/cli/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/packager/src/cli/mod.rs b/crates/packager/src/cli/mod.rs index d41111c3..cf9b5123 100644 --- a/crates/packager/src/cli/mod.rs +++ b/crates/packager/src/cli/mod.rs @@ -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::>(); + // 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(); } }