From 12b39bab684489f5f0a95cd72f0c4a6504575eda Mon Sep 17 00:00:00 2001 From: DecDuck Date: Thu, 11 Sep 2025 08:06:33 +1000 Subject: [PATCH] fix: potential fix for command window --- src-tauri/src/process/process_manager.rs | 25 ++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src-tauri/src/process/process_manager.rs b/src-tauri/src/process/process_manager.rs index 901671f..33fab1e 100644 --- a/src-tauri/src/process/process_manager.rs +++ b/src-tauri/src/process/process_manager.rs @@ -346,19 +346,24 @@ impl ProcessManager<'_> { .to_string(); #[cfg(target_os = "windows")] - use std::os::windows::process::CommandExt; - #[cfg(target_os = "windows")] - let mut command = Command::new("cmd"); - #[cfg(target_os = "windows")] - command.raw_arg(format!("/C \"{}\"", &launch_string)); + let mut command = { + use std::os::windows::process::CommandExt; + let mut command = Command::new("cmd"); + command.raw_arg(format!("/C \"{}\"", &launch_string)); + command.creation_flags(0x08000000); + + command + }; + #[cfg(unix)] + let mut command = { + let mut command: Command = Command::new("sh"); + command.args(vec!["-c", &launch_string]); + + command + }; info!("launching (in {install_dir}): {launch_string}",); - #[cfg(unix)] - let mut command: Command = Command::new("sh"); - #[cfg(unix)] - command.args(vec!["-c", &launch_string]); - debug!("final launch string:\n\n{launch_string}\n"); command