(args: &[&str])
| 137 | |
| 138 | #[cfg(all(windows, feature = "wsl"))] |
| 139 | fn wsl_cmd(args: &[&str]) -> Result<String> { |
| 140 | use std::{os::windows::process::CommandExt, process::Command}; |
| 141 | let output = Command::new("wsl") |
| 142 | .args(args) |
| 143 | .creation_flags(winapi::um::winbase::CREATE_NO_WINDOW) |
| 144 | .output() |
| 145 | .context("Failed to execute wsl")?; |
| 146 | process_utf16(&output.stdout).context("Failed to process stdout") |
| 147 | } |
| 148 | |
| 149 | #[cfg(all(windows, feature = "wsl"))] |
| 150 | fn fetch_wsl2_distros() -> Vec<String> { |
no test coverage detected