MCPcopy
hub / github.com/claude-code-best/claude-code / isCommandAvailable

Function isCommandAvailable

src/cli/updateCCB.ts:35–42  ·  view source on GitHub ↗
(cmd: string)

Source from the content-addressed store, hash-verified

33}
34
35function isCommandAvailable(cmd: string): boolean {
36 try {
37 execSync(`which ${cmd} 2>/dev/null`, { stdio: 'pipe' })
38 return true
39 } catch {
40 return false
41 }
42}
43
44/**
45 * Detect whether the current installation was done via bun.

Callers 1

updateCCBFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected