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

Function commandExists

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

Source from the content-addressed store, hash-verified

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

Callers 1

checkPrerequisitesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected