Fix: CLI Windows Write exe Errors (#3239)

* fix: windows write exec errors
* revision: gate kill_all behind windows
This commit is contained in:
Miles Murgaw authored and GitHub committed 2024-11-26 18:14:35 +01:00
1 parent f9617c8d33
commit 3af7d34ef3
2 files changed
+14

No files matched your search

+10
View File
@@ -107,6 +107,11 @@ pub(crate) async fn serve_all(mut args: ServeArgs) -> Result<()> {
} else if runner.should_full_rebuild {
tracing::info!(dx_src = ?TraceSrc::Dev, "Full rebuild: {}", file);
// Kill any running executables on Windows
if cfg!(windows) {
runner.kill_all();
}
// We're going to kick off a new build, interrupting the current build if it's ongoing
builder.rebuild(args.build_arguments.clone());
@@ -215,6 +220,11 @@ pub(crate) async fn serve_all(mut args: ServeArgs) -> Result<()> {
// `Hotreloading:` to keep the alignment during long edit sessions
tracing::info!("Full rebuild: triggered manually");
// Kill any running executables on Windows
if cfg!(windows) {
runner.kill_all();
}
builder.rebuild(args.build_arguments.clone());
runner.file_map.force_rebuild();
devserver.start_build().await