fix(cli): dev watcher incorrectly killing process on multiple file write (#4684)

This commit is contained in:
Lucas Fernandes Nogueira
2022-07-25 13:51:04 -03:00
committed by GitHub
parent e903dfe762
commit 47fab6809a
2 changed files with 14 additions and 1 deletions

6
.changes/fix-watcher.md Normal file
View File

@@ -0,0 +1,6 @@
---
"cli.rs": patch
"cli.js": patch
---
Fixes dev watcher incorrectly exiting the CLI when sequential file updates are detected.

View File

@@ -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
},
);
}
})?;