windows: Fix popup window when using external command (#15547)

Thanks techs-sus on Discord.


Co-authored-by: shenjack <3695888@qq.com>
Co-authored-by: techs-sus <discord>


Release Notes:

- N/A

Co-authored-by: shenjack <3695888@qq.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
张小白 2024-08-29 10:58:50 +08:00 committed by GitHub
parent 8e8927db4b
commit 598d62de04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 0 deletions

1
Cargo.lock generated
View File

@ -8323,6 +8323,7 @@ dependencies = [
"unindent",
"util",
"which 6.0.3",
"windows 0.58.0",
"worktree",
]

View File

@ -71,6 +71,9 @@ text.workspace = true
util.workspace = true
which.workspace = true
[target.'cfg(target_os = "windows")'.dependencies]
windows.workspace = true
[dev-dependencies]
client = { workspace = true, features = ["test-support"] }
collections = { workspace = true, features = ["test-support"] }

View File

@ -5449,6 +5449,11 @@ impl Project {
})?;
let mut child = smol::process::Command::new(command);
#[cfg(target_os = "windows")]
{
use smol::process::windows::CommandExt;
child.creation_flags(windows::Win32::System::Threading::CREATE_NO_WINDOW.0);
}
if let Some(working_dir_path) = working_dir_path {
child.current_dir(working_dir_path);