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

Function commandExists

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

Source from the content-addressed store, hash-verified

211// ═══════════════════════════════════════════════════════════════════════════
212
213function commandExists(cmd) {
214 const result =
215 process.platform === "win32"
216 ? spawnSync("where.exe", [cmd], { stdio: "pipe" })
217 : spawnSync("sh", ["-c", `command -v ${cmd}`], { stdio: "pipe" });
218
219 return result.status === 0;
220}
221
222function checkPrerequisites() {
223 logStep("1/3", "Checking prerequisites...");

Callers 1

checkPrerequisitesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected