MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / resolveHomeDir

Function resolveHomeDir

packages/codex-native-api/src/daemon_manager.ts:1188–1191  ·  view source on GitHub ↗
(env: NodeJS.ProcessEnv, platform: NodeJS.Platform)

Source from the content-addressed store, hash-verified

1186}
1187
1188function resolveHomeDir(env: NodeJS.ProcessEnv, platform: NodeJS.Platform): string {
1189 const requested = normalizeString(platform === 'win32' ? (env.USERPROFILE || env.HOME) : (env.HOME || env.USERPROFILE));
1190 return requested || os.homedir();
1191}
1192
1193function resolveUserName(env: NodeJS.ProcessEnv): string {
1194 return normalizeString(env.USER) || normalizeString(env.LOGNAME) || os.userInfo().username;

Callers 1

resolveDaemonLayoutFunction · 0.85

Calls 1

normalizeStringFunction · 0.70

Tested by

no test coverage detected