MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / cliConfigDirPresent

Function cliConfigDirPresent

src/installer/targets/copilot-cli.ts:68–76  ·  view source on GitHub ↗

* `~/.copilot` existing is NOT proof the CLI is installed: the VS Code * Copilot Chat extension drops MCP socket-handoff lock files into * `~/.copilot/ide/` on launch, so a machine with only the VS Code * extension still has the dir (with a lone `ide` entry). Count the dir * as a CLI footprint o

()

Source from the content-addressed store, hash-verified

66 * on first run.
67 */
68function cliConfigDirPresent(): boolean {
69 let entries: string[];
70 try {
71 entries = fs.readdirSync(configDir());
72 } catch {
73 return false;
74 }
75 return entries.some((e) => e !== 'ide');
76}
77
78/**
79 * Best-effort check that the `copilot` binary is reachable on PATH.

Callers 1

detectMethod · 0.85

Calls 1

configDirFunction · 0.70

Tested by

no test coverage detected