MCPcopy Create free account
hub / github.com/algoscienceacademy/RustUI / check_tool

Method check_tool

src/dev_server.rs:594–605  ·  view source on GitHub ↗

Add helper method for checking tool installations

(&self, tool: &str, args: &[&str])

Source from the content-addressed store, hash-verified

592
593 // Add helper method for checking tool installations
594 fn check_tool(&self, tool: &str, args: &[&str]) -> Result<(), Box<dyn std::error::Error>> {
595 let output = Command::new(tool)
596 .args(args)
597 .output()
598 .map_err(|_| format!("{} not found", tool))?;
599
600 if !output.status.success() {
601 return Err(format!("{} check failed", tool).into());
602 }
603
604 Ok(())
605 }
606}
607
608impl Drop for DevServer {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected