//! Background helpers inherit their log streams without opening a Windows terminal. use std::{ffi::OsStr, process::Command}; pub fn command(program: impl AsRef) -> Command { let mut command = Command::new(program); configure(&mut command); command } fn configure(command: &mut Command) { #[cfg(windows)] { use std::os::windows::process::CommandExt; command.creation_flags(windows_sys::Win32::System::Threading::CREATE_NO_WINDOW); } #[cfg(not(windows))] let _ = command; }