Skip to content

Commit

Permalink
fix(cli): dev watcher incorrectly killing process on multiple file wr…
Browse files Browse the repository at this point in the history
…ite (#4684)
  • Loading branch information
lucasfernog authored Jul 25, 2022
1 parent e903dfe commit 47fab68
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/fix-watcher.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---

Fixes dev watcher incorrectly exiting the CLI when sequential file updates are detected.
9 changes: 8 additions & 1 deletion tooling/cli/src/interface/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,14 @@ impl Rust {

app_child_.lock().unwrap().replace(app_child);
} else {
on_exit(status, reason);
on_exit(
status,
if manually_killed_app_.load(Ordering::Relaxed) {
ExitReason::TriggeredKill
} else {
reason
},
);
}
})?;

Expand Down

0 comments on commit 47fab68

Please sign in to comment.