Create synchronous Command (Windows automatically adds CREATE_NO_WINDOW)
(program: S)
| 90 | |
| 91 | /// Create synchronous Command (Windows automatically adds CREATE_NO_WINDOW) |
| 92 | pub fn create_command<S: AsRef<std::ffi::OsStr>>(program: S) -> Command { |
| 93 | let cmd = Command::new(program.as_ref()); |
| 94 | |
| 95 | #[cfg(windows)] |
| 96 | { |
| 97 | let mut cmd = cmd; |
| 98 | cmd.creation_flags(CREATE_NO_WINDOW); |
| 99 | cmd |
| 100 | } |
| 101 | |
| 102 | #[cfg(not(windows))] |
| 103 | cmd |
| 104 | } |
| 105 | |
| 106 | /// Create Tokio async Command (Windows automatically adds CREATE_NO_WINDOW) |
| 107 | pub fn create_tokio_command<S: AsRef<std::ffi::OsStr>>(program: S) -> TokioCommand { |
no outgoing calls
no test coverage detected