Fix output showing when background task errors

This commit is contained in:
Dheepak Krishnamurthy 2021-07-20 09:58:43 -06:00
parent f7d751a7f6
commit 468c772467

View file

@ -1483,15 +1483,9 @@ impl TaskwarriorTuiApp {
for s in cmd.iter().skip(1) {
command.arg(&s);
}
if let Ok(child) = command.spawn() {
let output = child.wait_with_output();
match output {
Ok(o) => {
if !o.status.success() {
break;
}
}
Err(s) => break,
if let Ok(output) = command.output() {
if !output.status.success() {
break;
}
} else {
break;