Skip to content

Commit 47fab68

Browse files
authored
fix(cli): dev watcher incorrectly killing process on multiple file write (#4684)
1 parent e903dfe commit 47fab68

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.changes/fix-watcher.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.rs": patch
3+
"cli.js": patch
4+
---
5+
6+
Fixes dev watcher incorrectly exiting the CLI when sequential file updates are detected.

tooling/cli/src/interface/rust.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,14 @@ impl Rust {
358358

359359
app_child_.lock().unwrap().replace(app_child);
360360
} else {
361-
on_exit(status, reason);
361+
on_exit(
362+
status,
363+
if manually_killed_app_.load(Ordering::Relaxed) {
364+
ExitReason::TriggeredKill
365+
} else {
366+
reason
367+
},
368+
);
362369
}
363370
})?;
364371

0 commit comments

Comments
 (0)