MCPcopy Create free account
hub / github.com/devcontainers/cli / normalizeEnv

Function normalizeEnv

src/spec-common/variableSubstitution.ts:65–74  ·  view source on GitHub ↗
(isWindows: boolean, originalEnv: NodeJS.ProcessEnv)

Source from the content-addressed store, hash-verified

63const VARIABLE_REGEXP = /\$\{(.*?)\}/g;
64
65function normalizeEnv(isWindows: boolean, originalEnv: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
66 if (isWindows) {
67 const env = Object.create(null);
68 Object.keys(originalEnv).forEach(key => {
69 env[key.toLowerCase()] = originalEnv[key];
70 });
71 return env;
72 }
73 return originalEnv;
74}
75
76function resolveString(replace: Replace, value: string): string {
77 // loop through all variables occurrences in 'value'

Callers 2

envFunction · 0.85
containerSubstituteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected