(context: SubstitutionContext, value: T)
| 18 | } |
| 19 | |
| 20 | export function substitute<T extends object>(context: SubstitutionContext, value: T): T { |
| 21 | let env: NodeJS.ProcessEnv | undefined; |
| 22 | const isWindows = context.platform === 'win32'; |
| 23 | const updatedContext = { |
| 24 | ...context, |
| 25 | get env() { |
| 26 | return env || (env = normalizeEnv(isWindows, context.env)); |
| 27 | } |
| 28 | }; |
| 29 | const replace = replaceWithContext.bind(undefined, isWindows, updatedContext); |
| 30 | if (context.containerWorkspaceFolder) { |
| 31 | updatedContext.containerWorkspaceFolder = resolveString(replace, context.containerWorkspaceFolder); |
| 32 | } |
| 33 | return substitute0(replace, value); |
| 34 | } |
| 35 | |
| 36 | export function beforeContainerSubstitute<T extends object>(idLabels: Record<string, string> | undefined, value: T): T { |
| 37 | let devcontainerId: string | undefined; |
no test coverage detected