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

Method detect

src/installer/targets/codex.ts:60–74  ·  view source on GitHub ↗
(loc: Location)

Source from the content-addressed store, hash-verified

58 }
59
60 detect(loc: Location): DetectionResult {
61 if (loc !== 'global') {
62 return { installed: false, alreadyConfigured: false };
63 }
64 const tomlPath = tomlConfigPath();
65 let alreadyConfigured = false;
66 if (fs.existsSync(tomlPath)) {
67 try {
68 const content = fs.readFileSync(tomlPath, 'utf-8');
69 alreadyConfigured = content.includes(`[${TOML_HEADER}]`);
70 } catch { /* ignore */ }
71 }
72 const installed = fs.existsSync(configDir());
73 return { installed, alreadyConfigured, configPath: tomlPath };
74 }
75
76 install(loc: Location, _opts: InstallOptions): WriteResult {
77 if (loc !== 'global') {

Callers

nothing calls this directly

Calls 2

tomlConfigPathFunction · 0.85
configDirFunction · 0.70

Tested by

no test coverage detected