print error log.

This commit is contained in:
licsber 2024-09-19 15:38:20 +08:00
parent 2c14b698bc
commit f2562fb7df

View File

@ -14,12 +14,13 @@ fn retry(cmd: &String, cmd_args: &[String]) {
match output {
Ok(output) => {
io::stdout().write_all(&output.stdout).unwrap();
if output.status.success() {
io::stdout().write_all(&output.stdout).unwrap();
break;
} else {
eprintln!("Command failed with status: {}", output.status);
}
eprintln!("Command failed with status: {}", output.status);
println!("{}", String::from_utf8_lossy(&output.stderr));
}
Err(_) => {
println!("Error, wait 1s for retry.")