(isWindows: boolean, originalEnv: NodeJS.ProcessEnv)
| 63 | const VARIABLE_REGEXP = /\$\{(.*?)\}/g; |
| 64 | |
| 65 | function 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 | |
| 76 | function resolveString(replace: Replace, value: string): string { |
| 77 | // loop through all variables occurrences in 'value' |
no outgoing calls
no test coverage detected