MCPcopy Index your code
hub / github.com/devcontainers/cli / beforeContainerSubstitute

Function beforeContainerSubstitute

src/spec-common/variableSubstitution.ts:36–39  ·  view source on GitHub ↗
(idLabels: Record<string, string> | undefined, value: T)

Source from the content-addressed store, hash-verified

34}
35
36export function beforeContainerSubstitute<T extends object>(idLabels: Record<string, string> | undefined, value: T): T {
37 let devcontainerId: string | undefined;
38 return substitute0(replaceDevContainerId.bind(undefined, () => devcontainerId || (idLabels && (devcontainerId = devcontainerIdForLabels(idLabels)))), value);
39}
40
41export function containerSubstitute<T extends object>(platform: NodeJS.Platform, configFile: URI | undefined, containerEnv: NodeJS.ProcessEnv, value: T): T {
42 const isWindows = platform === 'win32';

Callers 5

doSetUpFunction · 0.90
doRunUserCommandsFunction · 0.90
readConfigurationFunction · 0.90
resolveWithLocalFolderFunction · 0.90

Calls 2

devcontainerIdForLabelsFunction · 0.85
substitute0Function · 0.70

Tested by

no test coverage detected