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

Function updateMarkerFile

src/spec-common/injectHeadless.ts:439–446  ·  view source on GitHub ↗
(shellServer: ShellServer, location: string, content: string)

Source from the content-addressed store, hash-verified

437}
438
439async function updateMarkerFile(shellServer: ShellServer, location: string, content: string) {
440 try {
441 await shellServer.exec(`mkdir -p '${path.posix.dirname(location)}' && CONTENT="$(cat '${location}' 2>/dev/null || echo ENOENT)" && [ "\${CONTENT:-${content}}" != '${content}' ] && echo '${content}' > '${location}'`);
442 return true;
443 } catch (err) {
444 return false;
445 }
446}
447
448async function runPostAttachCommand(params: ResolverParameters, lifecycleCommandOriginMap: LifecycleHooksInstallMap, containerProperties: ContainerProperties, remoteEnv: Promise<Record<string, string>>, secrets: Promise<Record<string, string>>) {
449 await runLifecycleCommands(params, lifecycleCommandOriginMap, containerProperties, 'postAttachCommand', remoteEnv, secrets, true);

Callers 2

runPostCreateCommandFunction · 0.85
runPostStartCommandFunction · 0.85

Calls 1

execMethod · 0.65

Tested by

no test coverage detected