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

Function legacyWindowsConfigDir

src/installer/targets/opencode.ts:88–93  ·  view source on GitHub ↗

* Pre-#535 installs wrote the global entry to `%APPDATA%/opencode` — a dir * today's opencode never reads. Returns that legacy dir when it could hold * stale state (APPDATA set and resolving somewhere other than the real config * dir). Gated on the env var rather than `process.platform` so the cl

()

Source from the content-addressed store, hash-verified

86 * in real life and this is a no-op.
87 */
88function legacyWindowsConfigDir(): string | null {
89 const appData = process.env.APPDATA;
90 if (!appData || !appData.trim()) return null;
91 const legacy = path.join(appData, 'opencode');
92 return path.resolve(legacy) === path.resolve(globalConfigDir()) ? null : legacy;
93}
94
95function configBaseDir(loc: Location): string {
96 return loc === 'global' ? globalConfigDir() : process.cwd();

Callers 2

detectMethod · 0.85

Calls 3

globalConfigDirFunction · 0.70
resolveMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected