From 8419815c0ae02315a8a942488b334476884d1cac Mon Sep 17 00:00:00 2001 From: Ian Letourneau Date: Tue, 1 Jul 2025 17:03:17 -0400 Subject: [PATCH] replace check command output by spawn --- harmony_composer/src/main.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/harmony_composer/src/main.rs b/harmony_composer/src/main.rs index df31e19..648977e 100644 --- a/harmony_composer/src/main.rs +++ b/harmony_composer/src/main.rs @@ -73,10 +73,9 @@ async fn main() { .try_exists() .expect("couldn't check if path exists"); - let harmony_bin_path: PathBuf; - match harmony_path { + let harmony_bin_path: PathBuf = match harmony_path { true => { - harmony_bin_path = compile_harmony( + compile_harmony( cli_args.compile_method, cli_args.compile_platform, cli_args.harmony_path.clone(), @@ -84,7 +83,7 @@ async fn main() { .await } false => todo!("implement autodetect code"), - } + }; match cli_args.command { Some(command) => match command { @@ -103,8 +102,10 @@ async fn main() { }; let check_output = Command::new(check_script) - .output() - .expect("failed to run check script"); + .spawn() + .expect("failed to run check script") + .wait_with_output() + .unwrap(); info!( "check stdout: {}, check stderr: {}", String::from_utf8(check_output.stdout).expect("couldn't parse from utf8"),