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

This commit is contained in:
Lucas Fernandes Nogueira 2020-07-04 15:08:06 -03:00 committed by GitHub
parent 61437b3b3d
commit b12bd40170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View File

@ -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()))?;

View File

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

View File

@ -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()))?;

View File

@ -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)