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

Function loadRepoEnvDefaults

src/cli.ts:1055–1065  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1053}
1054
1055function loadRepoEnvDefaults() {
1056 const combined = {
1057 ...parseEnvFile(path.join(REPO_ROOT, '.env')),
1058 ...parseEnvFile(path.join(REPO_ROOT, '.env.local')),
1059 };
1060 for (const [key, value] of Object.entries(combined)) {
1061 if (process.env[key] === undefined) {
1062 process.env[key] = value;
1063 }
1064 }
1065}
1066
1067function parseEnvFile(filePath: string): Record<string, string> {
1068 if (!fs.existsSync(filePath)) {

Callers 1

mainFunction · 0.85

Calls 1

parseEnvFileFunction · 0.85

Tested by

no test coverage detected