MCPcopy Create free account
hub / github.com/Noumena-Network/code / isCommandAvailable

Function isCommandAvailable

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

Source from the content-addressed store, hash-verified

29})
30
31async function isCommandAvailable(command: string): Promise<boolean> {
32 try {
33 // which does not execute the file.
34 return !!(await which(command))
35 } catch {
36 return false
37 }
38}
39
40const detectPackageManagers = memoize(async (): Promise<string[]> => {
41 const packageManagers = []

Callers 1

env.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected