MCPcopy Index your code
hub / github.com/encounter/objdiff / wsl_cmd

Function wsl_cmd

objdiff-gui/src/views/config.rs:139–147  ·  view source on GitHub ↗
(args: &[&str])

Source from the content-addressed store, hash-verified

137
138#[cfg(all(windows, feature = "wsl"))]
139fn 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"))]
150fn fetch_wsl2_distros() -> Vec<String> {

Callers 1

fetch_wsl2_distrosFunction · 0.85

Calls 1

process_utf16Function · 0.85

Tested by

no test coverage detected