MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isCommandAvailable

Function isCommandAvailable

src/utils/env.ts:40–47  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

38})
39
40async function isCommandAvailable(command: string): Promise<boolean> {
41 try {
42 // which does not execute the file.
43 return !!(await which(command))
44 } catch {
45 return false
46 }
47}
48
49const detectPackageManagers = memoize(async (): Promise<string[]> => {
50 const packageManagers = []

Callers 1

env.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected