mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-20 02:47:34 +03:00
repl: Don't show cmd window on Windows (#16016)
Closes #15955 . Release Notes: - Fixed `cmd` window showing when repl executing commands([#15955](https://github.com/zed-industries/zed/issues/15955) ).
This commit is contained in:
parent
fa51651d06
commit
03796e79b0
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -8832,6 +8832,7 @@ dependencies = [
|
|||||||
"ui",
|
"ui",
|
||||||
"util",
|
"util",
|
||||||
"uuid",
|
"uuid",
|
||||||
|
"windows 0.58.0",
|
||||||
"workspace",
|
"workspace",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -43,6 +43,9 @@ util.workspace = true
|
|||||||
uuid.workspace = true
|
uuid.workspace = true
|
||||||
workspace.workspace = true
|
workspace.workspace = true
|
||||||
|
|
||||||
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
|
windows.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
editor = { workspace = true, features = ["test-support"] }
|
editor = { workspace = true, features = ["test-support"] }
|
||||||
env_logger.workspace = true
|
env_logger.workspace = true
|
||||||
|
@ -55,6 +55,12 @@ impl KernelSpecification {
|
|||||||
cmd.envs(env);
|
cmd.envs(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
|
use smol::process::windows::CommandExt;
|
||||||
|
cmd.creation_flags(windows::Win32::System::Threading::CREATE_NO_WINDOW.0);
|
||||||
|
}
|
||||||
|
|
||||||
Ok(cmd)
|
Ok(cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -395,11 +401,17 @@ pub async fn kernel_specifications(fs: Arc<dyn Fs>) -> Result<Vec<KernelSpecific
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search for kernels inside the base python environment
|
// Search for kernels inside the base python environment
|
||||||
let command = Command::new("python")
|
let mut command = Command::new("python");
|
||||||
.arg("-c")
|
command.arg("-c");
|
||||||
.arg("import sys; print(sys.prefix)")
|
command.arg("import sys; print(sys.prefix)");
|
||||||
.output()
|
|
||||||
.await;
|
#[cfg(windows)]
|
||||||
|
{
|
||||||
|
use smol::process::windows::CommandExt;
|
||||||
|
command.creation_flags(windows::Win32::System::Threading::CREATE_NO_WINDOW.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
let command = command.output().await;
|
||||||
|
|
||||||
if let Ok(command) = command {
|
if let Ok(command) = command {
|
||||||
if command.status.success() {
|
if command.status.success() {
|
||||||
|
Loading…
Reference in New Issue
Block a user