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

Function addSubstitution

src/spec-node/utils.ts:163–171  ·  view source on GitHub ↗
(config: SubstitutedConfig<T>, substitute: SubstituteConfig)

Source from the content-addressed store, hash-verified

161export type SubstituteConfig = <U extends DevContainerConfig | ImageMetadataEntry>(value: U) => U;
162
163export function addSubstitution<T extends DevContainerConfig | ImageMetadataEntry[]>(config: SubstitutedConfig<T>, substitute: SubstituteConfig): SubstitutedConfig<T> {
164 const substitute0 = config.substitute;
165 const subsConfig = config.config;
166 return {
167 config: (Array.isArray(subsConfig) ? subsConfig.map(substitute) : substitute(subsConfig)) as T,
168 raw: config.raw,
169 substitute: value => substitute(substitute0(value)),
170 };
171}
172
173export async function startEventSeen(params: DockerResolverParameters, labels: Record<string, string>, canceled: Promise<void>, output: Log, trace: boolean) {
174 if (params.cliVariant === CLIVariant.Wslc) {

Callers 4

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

Calls 2

substituteFunction · 0.85
substitute0Function · 0.70

Tested by

no test coverage detected