소스 검색

chore(bundler) improve "running script" log (#747)

Lucas Fernandes Nogueira 5 년 전
부모
커밋
b12bd40170

+ 1 - 0
cli/tauri-bundler/src/bundle/appimage_bundle.rs

@@ -91,6 +91,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
   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()))?;
 

+ 1 - 1
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"));
     }
   }
 

+ 1 - 0
cli/tauri-bundler/src/bundle/dmg_bundle.rs

@@ -111,6 +111,7 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
     .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()))?;
 

+ 2 - 2
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)