MCPcopy Create free account
hub / github.com/GCWing/BitFun / check_commands_exist

Function check_commands_exist

src/apps/desktop/src/api/system_api.rs:252–270  ·  view source on GitHub ↗
(
    commands: Vec<String>,
)

Source from the content-addressed store, hash-verified

250
251#[tauri::command]
252pub async fn check_commands_exist(
253 commands: Vec<String>,
254) -> Result<Vec<(String, CheckCommandResponse)>, String> {
255 let cmd_refs: Vec<&str> = commands.iter().map(|s| s.as_str()).collect();
256 let results = system::check_commands(&cmd_refs);
257
258 Ok(results
259 .into_iter()
260 .map(|(name, result)| {
261 (
262 name,
263 CheckCommandResponse {
264 exists: result.exists,
265 path: result.path,
266 },
267 )
268 })
269 .collect())
270}
271
272#[tauri::command]
273pub async fn run_system_command(

Callers

nothing calls this directly

Calls 4

check_commandsFunction · 0.85
collectMethod · 0.80
iterMethod · 0.80
as_strMethod · 0.45

Tested by

no test coverage detected