mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 15:00:46 +00:00
test: simplify acp env key normalization
This commit is contained in:
@@ -10,7 +10,13 @@ vi.mock("../secrets/provider-env-vars.js", () => ({
|
||||
baseEnv: NodeJS.ProcessEnv,
|
||||
keys: Iterable<string>,
|
||||
): NodeJS.ProcessEnv => {
|
||||
const denied = new Set([...keys].map((key) => key.trim().toUpperCase()).filter(Boolean));
|
||||
const denied = new Set<string>();
|
||||
for (const key of keys) {
|
||||
const normalized = key.trim().toUpperCase();
|
||||
if (normalized) {
|
||||
denied.add(normalized);
|
||||
}
|
||||
}
|
||||
const env = { ...baseEnv };
|
||||
for (const key of Object.keys(env)) {
|
||||
if (denied.has(key.toUpperCase())) {
|
||||
|
||||
Reference in New Issue
Block a user