MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / normalizeEnvWithPrefix

Function normalizeEnvWithPrefix

src/utils/environment.ts:63–74  ·  view source on GitHub ↗
(
  prefix: string,
  vars: Record<string, string>,
)

Source from the content-addressed store, hash-verified

61}
62
63function normalizeEnvWithPrefix(
64 prefix: string,
65 vars: Record<string, string>,
66): Record<string, string> {
67 const normalized: Record<string, string> = {};
68 for (const [key, value] of Object.entries(vars ?? {})) {
69 if (value == null) continue;
70 const prefixedKey = key.startsWith(prefix) ? key : `${prefix}${key}`;
71 normalized[prefixedKey] = value;
72 }
73 return normalized;
74}
75
76/**
77 * Normalizes environment variables by ensuring they are prefixed with TEST_RUNNER_.

Callers 2

normalizeTestRunnerEnvFunction · 0.85
normalizeSimctlChildEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected