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

Function envListToObj

src/spec-node/utils.ts:522–531  ·  view source on GitHub ↗
(list: string[] | null | undefined)

Source from the content-addressed store, hash-verified

520}
521
522export function envListToObj(list: string[] | null | undefined) {
523 // Handle Env is null (https://github.com/microsoft/vscode-remote-release/issues/2058).
524 return (list || []).reduce((obj, pair) => {
525 const i = pair.indexOf('=');
526 if (i !== -1) {
527 obj[pair.substring(0, i)] = pair.substring(i + 1);
528 }
529 return obj;
530 }, {} as Record<string, string>);
531}
532
533export async function runInitializeCommand(params: DockerResolverParameters, userCommand: LifecycleCommand | undefined, onDidInput?: Event<string>) {
534 if (!userCommand) {

Callers 11

cli.build.test.tsFile · 0.90
provisionFunction · 0.90
doSetUpFunction · 0.90
doRunUserCommandsFunction · 0.90
readConfigurationFunction · 0.90
substitute2Function · 0.90
doExecFunction · 0.90
resolveWithLocalFolderFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected