Skip to content

Commit

Permalink
fix screen not always cleared when cargo is in quiet mode
Browse files Browse the repository at this point in the history
Fix #131
  • Loading branch information
Canop committed Dec 24, 2023
1 parent 3c18982 commit 656ea95
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### next
- fix output not cleared when cargo is in quiet mode and there's nothing - Fix #131

<a name="v2.14.0"></a>
### v2.14.0 - 2023/10/04
- F5 now clears the output before running the job (now bound to `refresh` internal)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,10 @@ pub fn run(
CommandExecInfo::End { status } => {
info!("execution finished with status: {:?}", status);
// computation finished
if let Some(output) = state.take_output() {
let cmd_result = CommandResult::new(output, status)?;
state.set_result(cmd_result);
action = state.action();
} else {
warn!("a computation finished but didn't start?");
state.computation_stops();
}
let output = state.take_output().unwrap_or_default();
let cmd_result = CommandResult::new(output, status)?;
state.set_result(cmd_result);
action = state.action();
}
CommandExecInfo::Error(e) => {
warn!("error in computation: {}", e);
Expand Down

0 comments on commit 656ea95

Please sign in to comment.