diff --git a/crates/ide-build/src/compile/single.rs b/crates/ide-build/src/compile/single.rs index 0625c5a4f..898820200 100644 --- a/crates/ide-build/src/compile/single.rs +++ b/crates/ide-build/src/compile/single.rs @@ -236,10 +236,9 @@ fn classpath( } args.extend(["dependency:build-classpath", output_arg.as_str(), scope_arg.as_str(), "-q"]); let top_dir = subdir(root, &target.top.dir); - let status = ProcCommand::new(&target.top.command) - .args(&args) - .envs(&target.top.env) - .current_dir(&top_dir) + let mut command = ProcCommand::new(&target.top.command); + command.args(&args).envs(&target.top.env).current_dir(&top_dir); + let status = ide_core::process::prepare(&mut command) .output() .map_err(|e| IdeError::internal(format!("cannot resolve the compile classpath: {e}")))?; if !status.status.success() { diff --git a/crates/ide-run/src/dotnet.rs b/crates/ide-run/src/dotnet.rs index 01b5284ad..002ed38e0 100644 --- a/crates/ide-run/src/dotnet.rs +++ b/crates/ide-run/src/dotnet.rs @@ -230,7 +230,7 @@ pub async fn target_path(root: &Path, config: &RunConfig) -> IdeResult { } let mut command = std::process::Command::new(&config.command); command.args(args).current_dir(root); - ide_core::process::host_env(&mut command); + ide_core::process::prepare(&mut command); if !config.extras.include_system_env { command.env_clear(); } else { diff --git a/crates/ide-run/src/go.rs b/crates/ide-run/src/go.rs index 2d9b260cc..d714e0764 100644 --- a/crates/ide-run/src/go.rs +++ b/crates/ide-run/src/go.rs @@ -124,6 +124,11 @@ fn package_info(mut command: Command, dir: &Path, flags: &[String]) -> IdeResult } } command.arg(".").current_dir(dir).stdin(Stdio::null()).stdout(Stdio::piped()).stderr(Stdio::piped()); + #[cfg(windows)] + { + use std::os::windows::process::CommandExt; + command.creation_flags(ide_core::process::CREATE_NO_WINDOW); + } let mut child = command.spawn()?; let stdout = child.stdout.take(); let stderr = child.stderr.take();