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

Function globalConfigDir

src/installer/targets/opencode.ts:59–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57} from '../instructions-template';
58
59function globalConfigDir(): string {
60 // XDG_CONFIG_HOME if set, else ~/.config — on every platform, matching
61 // opencode's own `xdg-basedir` resolution (no Windows special case; #535).
62 const xdg = process.env.XDG_CONFIG_HOME && process.env.XDG_CONFIG_HOME.trim().length > 0
63 ? process.env.XDG_CONFIG_HOME
64 : path.join(os.homedir(), '.config');
65 return path.join(xdg, 'opencode');
66}
67
68/**
69 * Pre-#535 installs wrote the global entry to `%APPDATA%/opencode` — a dir

Callers 3

legacyWindowsConfigDirFunction · 0.85
configBaseDirFunction · 0.85
detectMethod · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected