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

Function legacyWindowsConfigDir

src/installer/targets/opencode.ts:76–81  ·  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

74 * in real life and this is a no-op.
75 */
76function legacyWindowsConfigDir(): string | null {
77 const appData = process.env.APPDATA;
78 if (!appData || !appData.trim()) return null;
79 const legacy = path.join(appData, 'opencode');
80 return path.resolve(legacy) === path.resolve(globalConfigDir()) ? null : legacy;
81}
82
83function configBaseDir(loc: Location): string {
84 return loc === 'global' ? globalConfigDir() : process.cwd();

Callers 2

detectMethod · 0.85

Calls 3

globalConfigDirFunction · 0.85
resolveMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected