MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / commandExists

Function commandExists

scripts/dev-static.mjs:186–193  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

184// ═══════════════════════════════════════════════════════════════════════════
185
186function commandExists(cmd) {
187 const result =
188 process.platform === "win32"
189 ? spawnSync("where.exe", [cmd], { stdio: "pipe" })
190 : spawnSync("sh", ["-c", `command -v ${cmd}`], { stdio: "pipe" });
191
192 return result.status === 0;
193}
194
195function checkPrerequisites() {
196 logStep("1/3", "Checking prerequisites...");

Callers 1

checkPrerequisitesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected