diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-16 21:23:53 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-16 21:23:53 +0300 |
| commit | 616d1dd8125ece4a9102b231864cb4fc4b761497 (patch) | |
| tree | 24647750130d05dcf4a0a262a1976b6bdd0fcee8 /src/noninteractive_process.rs | |
| parent | 76a4e3ccb0958ff54badfa65ba4d224d6b0c29a1 (diff) | |
fix(windows): suppress noninteractive process windows
refs #1468
Diffstat (limited to 'src/noninteractive_process.rs')
| -rw-r--r-- | src/noninteractive_process.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/noninteractive_process.rs b/src/noninteractive_process.rs new file mode 100644 index 00000000..98198dce --- /dev/null +++ b/src/noninteractive_process.rs @@ -0,0 +1,12 @@ +use std::{ffi::OsStr, process::Command}; + +/// Builds a subprocess whose stdio is controlled by the caller and which never opens a Windows console. +pub(crate) fn command(program: impl AsRef<OsStr>) -> Command { + let mut command = Command::new(program); + crate::platform::configure_background_command(&mut command); + command +} + +pub(crate) fn curl_command() -> Command { + command("curl") +} |
