From d887e2050fc90af3d3210e6bd1eee5989431b811 Mon Sep 17 00:00:00 2001 From: Xiaobo Liu Date: Sun, 2 Nov 2025 16:15:01 +0800 Subject: [PATCH] windows: Hide background helpers behind CREATE_NO_WINDOW (#41737) Close https://github.com/zed-industries/zed/issues/41538 Release Notes: - Fixed some processes on windows not spawning with CREATE_NO_WINDOW --------- Signed-off-by: Xiaobo Liu --- Cargo.lock | 1 + crates/auto_update/Cargo.toml | 1 + crates/auto_update/src/auto_update.rs | 2 +- crates/fs/src/fs.rs | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c0eea670a77f03c4dbb5afdb7d1197b6d9b76159..3dc7b2337edcb1d155a56f241b517db5a2ad8045 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1339,6 +1339,7 @@ dependencies = [ "settings", "smol", "tempfile", + "util", "which 6.0.3", "workspace", ] diff --git a/crates/auto_update/Cargo.toml b/crates/auto_update/Cargo.toml index 08db9f8a97bb0783da987f84991ad1aaa62c2141..630be043dca120ca76b2552f0a729a03a684f934 100644 --- a/crates/auto_update/Cargo.toml +++ b/crates/auto_update/Cargo.toml @@ -26,6 +26,7 @@ serde_json.workspace = true settings.workspace = true smol.workspace = true tempfile.workspace = true +util.workspace = true workspace.workspace = true [target.'cfg(not(target_os = "windows"))'.dependencies] diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs index 9f93dd27900e4b90de8c6d61d41b3b6c287eaaf0..331a58414958a48feaad70babee2dc2ea3b730e0 100644 --- a/crates/auto_update/src/auto_update.rs +++ b/crates/auto_update/src/auto_update.rs @@ -962,7 +962,7 @@ pub async fn finalize_auto_update_on_quit() { .parent() .map(|p| p.join("tools").join("auto_update_helper.exe")) { - let mut command = smol::process::Command::new(helper); + let mut command = util::command::new_smol_command(helper); command.arg("--launch"); command.arg("false"); if let Ok(mut cmd) = command.spawn() { diff --git a/crates/fs/src/fs.rs b/crates/fs/src/fs.rs index c794303ef71232d5a162b51ec8db7d472328b767..0202b2134f4fd0d3f983b2c67e97414a44457143 100644 --- a/crates/fs/src/fs.rs +++ b/crates/fs/src/fs.rs @@ -377,7 +377,7 @@ impl Fs for RealFs { #[cfg(windows)] if smol::fs::metadata(&target).await?.is_dir() { - let status = smol::process::Command::new("cmd") + let status = new_smol_command("cmd") .args(["/C", "mklink", "/J"]) .args([path, target.as_path()]) .status()