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

Function commandExists

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

Source from the content-addressed store, hash-verified

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

Callers 1

checkPrerequisitesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected