mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 22:14:34 +00:00
perf(test): speed up config tests
This commit is contained in:
@@ -29,3 +29,16 @@ export function collectConfigEnvVars(cfg?: OpenClawConfig): Record<string, strin
|
||||
|
||||
return entries;
|
||||
}
|
||||
|
||||
export function applyConfigEnvVars(
|
||||
cfg: OpenClawConfig,
|
||||
env: NodeJS.ProcessEnv = process.env,
|
||||
): void {
|
||||
const entries = collectConfigEnvVars(cfg);
|
||||
for (const [key, value] of Object.entries(entries)) {
|
||||
if (env[key]?.trim()) {
|
||||
continue;
|
||||
}
|
||||
env[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user