Skip to content

Commit

Permalink
fix progress line overwrite moonc diagnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
Young-Flash committed Dec 26, 2024
1 parent e0734e6 commit 71fa918
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
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.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "n2"
version = "0.1.4"
version = "0.1.5"
categories = ["development-tools", "development-tools::build-utils"]
edition = "2018"
exclude = [".github/*", ".vscode/*"]
Expand Down
5 changes: 5 additions & 0 deletions src/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ impl FancyState {
fn task_finished(&mut self, id: BuildId, build: &Build, result: &TaskResult) {
self.tasks
.remove(self.tasks.iter().position(|t| t.id == id).unwrap());

self.clear_progress();

match result.termination {
Termination::Success => {
// Common case: don't show anything.
Expand All @@ -298,6 +301,8 @@ impl FancyState {
std::io::stdout().write_all(&result.output).unwrap();
}
}

// mark as dirty to trigger progress update
self.dirty();
}

Expand Down

0 comments on commit 71fa918

Please sign in to comment.