diff --git a/.changes/fix-watcher.md b/.changes/fix-watcher.md new file mode 100644 index 000000000..6f63cfd56 --- /dev/null +++ b/.changes/fix-watcher.md @@ -0,0 +1,6 @@ +--- +"cli.rs": patch +"cli.js": patch +--- + +Fixes dev watcher incorrectly exiting the CLI when sequential file updates are detected. diff --git a/tooling/cli/src/interface/rust.rs b/tooling/cli/src/interface/rust.rs index 958a39ece..1765dd302 100644 --- a/tooling/cli/src/interface/rust.rs +++ b/tooling/cli/src/interface/rust.rs @@ -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 + }, + ); } })?;