diff options
-rw-r--r-- | src/commands/build.rs | 10 | ||||
-rw-r--r-- | src/orchestrator/orchestrator.rs | 9 |
2 files changed, 16 insertions, 3 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs index 591dd34..e0ae497 100644 --- a/src/commands/build.rs +++ b/src/commands/build.rs @@ -1,4 +1,5 @@ use std::collections::BTreeMap; +use std::io::Write; use std::path::Path; use std::sync::Arc; use std::sync::RwLock; @@ -183,5 +184,12 @@ pub async fn build<'a>(matches: &ArgMatches, .await?; info!("Running orchestrator..."); - orch.run().await + let res = orch.run().await?; + let out = std::io::stdout(); + let mut outlock = out.lock(); + + writeln!(outlock, "Packages created:")?; + res.into_iter() + .map(|path| writeln!(outlock, "-> {}", path.display()).map_err(Error::from)) + .collect::<Result<_>>() } diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs index 5fee202..4b195a6 100644 --- a/src/orchestrator/orchestrator.rs +++ b/src/orchestrator/orchestrator.rs @@ -60,9 +60,10 @@ impl OrchestratorSetup { impl Orchestrator { - pub async fn run(self) -> Result<()> { + pub async fn run(self) -> Result<Vec<PathBuf>> { use tokio::stream::StreamExt; + let mut report_result = vec![]; let number_of_jobsets = self.jobsets.len(); let _database = self.database; @@ -172,10 +173,14 @@ impl Orchestrator { .map_err(Error::from) } } + } + + let mut results = results; // rebind! + report_result.append(&mut results); } - Ok(()) + Ok(report_result) } } |