MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / commandAvailable

Function commandAvailable

apps/desktop/src/main/vault.ts:1941–1953  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

1939}
1940
1941async function commandAvailable(command: string): Promise<boolean> {
1942 try {
1943 await execFileAsync(command, ['--version'], {
1944 timeout: COMMAND_CHECK_TIMEOUT_MS,
1945 windowsHide: true,
1946 maxBuffer: 256 * 1024
1947 })
1948 return true
1949 } catch (error) {
1950 if ((error as NodeJS.ErrnoException | null)?.code === 'ENOENT') return false
1951 return false
1952 }
1953}
1954
1955export async function searchVaultTextCapabilities(
1956 rawPaths: VaultTextSearchToolPaths = {},

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected