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

Function commandExists

scripts/dev-with-automation.mjs:466–473  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

464// ═══════════════════════════════════════════════════════════════════════════
465
466function commandExists(cmd) {
467 const result =
468 process.platform === "win32"
469 ? spawnSync("where.exe", [cmd], { stdio: "pipe" })
470 : spawnSync("sh", ["-c", `command -v ${cmd}`], { stdio: "pipe" });
471
472 return result.status === 0;
473}
474
475function checkPrerequisites({
476 checkUvx = true,

Callers 1

checkPrerequisitesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected