MCPcopy Create free account
hub / github.com/anus-dev/ANUS / commandExists

Function commandExists

packages/core/src/utils/editor.ts:38–48  ·  view source on GitHub ↗
(cmd: string)

Source from the content-addressed store, hash-verified

36}
37
38function commandExists(cmd: string): boolean {
39 try {
40 execSync(
41 process.platform === 'win32' ? `where.exe ${cmd}` : `command -v ${cmd}`,
42 { stdio: 'ignore' },
43 );
44 return true;
45 } catch {
46 return false;
47 }
48}
49
50/**
51 * Editor command configurations for different platforms.

Callers 2

checkHasEditorTypeFunction · 0.70
getDiffCommandFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected