Fix: CLI Windows Write exe Errors (#3239)
* fix: windows write exec errors * revision: gate kill_all behind windows
This commit is contained in:
1 parent
f9617c8d33
commit
3af7d34ef3
2 files changed
+14
No files matched your search
@@ -107,6 +107,11 @@ pub(crate) async fn serve_all(mut args: ServeArgs) -> Result<()> {
|
|||||||
} else if runner.should_full_rebuild {
|
} else if runner.should_full_rebuild {
|
||||||
tracing::info!(dx_src = ?TraceSrc::Dev, "Full rebuild: {}", file);
|
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
|
// We're going to kick off a new build, interrupting the current build if it's ongoing
|
||||||
builder.rebuild(args.build_arguments.clone());
|
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
|
// `Hotreloading:` to keep the alignment during long edit sessions
|
||||||
tracing::info!("Full rebuild: triggered manually");
|
tracing::info!("Full rebuild: triggered manually");
|
||||||
|
|
||||||
|
// Kill any running executables on Windows
|
||||||
|
if cfg!(windows) {
|
||||||
|
runner.kill_all();
|
||||||
|
}
|
||||||
|
|
||||||
builder.rebuild(args.build_arguments.clone());
|
builder.rebuild(args.build_arguments.clone());
|
||||||
runner.file_map.force_rebuild();
|
runner.file_map.force_rebuild();
|
||||||
devserver.start_build().await
|
devserver.start_build().await
|
||||||
|
|||||||
@@ -141,6 +141,10 @@ impl AppRunner {
|
|||||||
self.running.remove(&platform);
|
self.running.remove(&platform);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub(crate) fn kill_all(&mut self) {
|
||||||
|
self.running.clear();
|
||||||
|
}
|
||||||
|
|
||||||
/// Open an existing app bundle, if it exists
|
/// Open an existing app bundle, if it exists
|
||||||
pub(crate) async fn open_existing(&self, devserver: &WebServer) {
|
pub(crate) async fn open_existing(&self, devserver: &WebServer) {
|
||||||
if let Some(address) = devserver.server_address() {
|
if let Some(address) = devserver.server_address() {
|
||||||
|
|||||||
Reference in new issue
Block a user