Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

windows: Hide background helpers behind CREATE_NO_WINDOW (#41737)

Xiaobo Liud887e2050fc9
diff --git a/Cargo.lock b/Cargo.lock
index c0eea670a77..3dc7b2337ed 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 08db9f8a97b..630be043dca 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 9f93dd27900..331a5841495 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 c794303ef71..0202b2134f4 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()