fix: potential fix for command window
Some checks failed
Clippy check / clippy_check (push) Has been cancelled

This commit is contained in:
DecDuck 2025-09-11 08:06:33 +10:00
parent 3f18d15d39
commit 12b39bab68
No known key found for this signature in database
GPG key ID: 3999E3EFEC9EEB74

View file

@ -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