MCPcopy
hub / github.com/coder/mux / initWorkspace

Method initWorkspace

src/node/runtime/DevcontainerRuntime.ts:564–582  ·  view source on GitHub ↗

* Run .mux/init hook inside the devcontainer.

(params: WorkspaceInitParams)

Source from the content-addressed store, hash-verified

562 * Run .mux/init hook inside the devcontainer.
563 */
564 async initWorkspace(params: WorkspaceInitParams): Promise<WorkspaceInitResult> {
565 return runWorkspaceInitHook({
566 params,
567 runtimeType: "devcontainer",
568 hookCheckPath: params.workspacePath,
569 runHook: async ({ muxEnv, initLogger, abortSignal }) => {
570 const containerWorkspacePath = this.remoteWorkspaceFolder ?? params.workspacePath;
571 const hookPath = `${containerWorkspacePath}/.mux/init`;
572 await runInitHookOnRuntime(
573 this,
574 hookPath,
575 containerWorkspacePath,
576 muxEnv,
577 initLogger,
578 abortSignal
579 );
580 },
581 });
582 }
583
584 /**
585 * Execute a command inside the devcontainer.

Callers

nothing calls this directly

Calls 2

runWorkspaceInitHookFunction · 0.90
runInitHookOnRuntimeFunction · 0.90

Tested by

no test coverage detected