From b12bd4017096e1335d20e864ca04fc85cd2a904b Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sat, 4 Jul 2020 15:08:06 -0300 Subject: [PATCH] chore(bundler) improve "running script" log (#747) --- cli/tauri-bundler/src/bundle/appimage_bundle.rs | 1 + cli/tauri-bundler/src/bundle/common.rs | 2 +- cli/tauri-bundler/src/bundle/dmg_bundle.rs | 1 + cli/tauri-bundler/src/bundle/wix.rs | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/cli/tauri-bundler/src/bundle/appimage_bundle.rs b/cli/tauri-bundler/src/bundle/appimage_bundle.rs index e9b00bbaf..1734c76c5 100644 --- a/cli/tauri-bundler/src/bundle/appimage_bundle.rs +++ b/cli/tauri-bundler/src/bundle/appimage_bundle.rs @@ -91,6 +91,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { let mut cmd = Command::new(&sh_file); cmd.current_dir(output_path); + common::print_info("running build_appimage.sh")?; common::execute_with_output(&mut cmd) .map_err(|_| crate::Error::ShellScriptError("error running build_appimage.sh".to_owned()))?; diff --git a/cli/tauri-bundler/src/bundle/common.rs b/cli/tauri-bundler/src/bundle/common.rs index a7255066b..cce5c8ed9 100644 --- a/cli/tauri-bundler/src/bundle/common.rs +++ b/cli/tauri-bundler/src/bundle/common.rs @@ -277,7 +277,7 @@ pub fn execute_with_output(cmd: &mut Command) -> crate::Result<()> { let reader = BufReader::new(stdout); for line in reader.lines() { - print_info(line.expect("Failed to get line").as_str())?; + println!("{}", line.expect("Failed to get line")); } } diff --git a/cli/tauri-bundler/src/bundle/dmg_bundle.rs b/cli/tauri-bundler/src/bundle/dmg_bundle.rs index a5a505250..4f7a581a1 100644 --- a/cli/tauri-bundler/src/bundle/dmg_bundle.rs +++ b/cli/tauri-bundler/src/bundle/dmg_bundle.rs @@ -111,6 +111,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { .args(args) .args(vec![dmg_name.as_str(), bundle_name.as_str()]); + common::print_info("running bundle_dmg.sh")?; common::execute_with_output(&mut cmd) .map_err(|_| crate::Error::ShellScriptError("error running bundle_dmg.sh".to_owned()))?; diff --git a/cli/tauri-bundler/src/bundle/wix.rs b/cli/tauri-bundler/src/bundle/wix.rs index 306d5ea6a..d2c9dd9cb 100644 --- a/cli/tauri-bundler/src/bundle/wix.rs +++ b/cli/tauri-bundler/src/bundle/wix.rs @@ -348,6 +348,7 @@ fn run_candle( .stdout(Stdio::piped()) .current_dir(build_path); + common::print_info("running candle.exe"); common::execute_with_output(&mut cmd).map_err(|_| crate::Error::CandleError) } @@ -371,14 +372,13 @@ fn run_light( args.push(p.to_string()); } - common::print_info(format!("running light to produce {}", output_path.display()).as_str())?; - let mut cmd = Command::new(&light_exe); cmd .args(&args) .stdout(Stdio::piped()) .current_dir(build_path); + common::print_info(format!("running light to produce {}", output_path.display()).as_str())?; common::execute_with_output(&mut cmd) .map(|_| output_path.to_path_buf()) .map_err(|_| crate::Error::LightError)