MCPcopy Create free account
hub / github.com/coder/mux / getWorkspacePath

Method getWorkspacePath

src/node/runtime/WorktreeRuntime.ts:49–61  ·  view source on GitHub ↗
(projectPath: string, workspaceName: string)

Source from the content-addressed store, hash-verified

47 }
48
49 getWorkspacePath(projectPath: string, workspaceName: string): string {
50 // Honor an explicit persisted path for this runtime's own workspace so callers (cwd resolution,
51 // ensureReady, agent discovery) land in the shared parent checkout instead of a name-derived
52 // directory that was never created. Mirrors SSHRuntime.getWorkspacePath.
53 if (
54 this.currentWorkspacePath &&
55 this.currentProjectPath === projectPath &&
56 this.currentWorkspaceName === workspaceName
57 ) {
58 return this.currentWorkspacePath;
59 }
60 return this.worktreeManager.getWorkspacePath(projectPath, workspaceName);
61 }
62
63 override async ensureReady(options?: EnsureReadyOptions): Promise<EnsureReadyResult> {
64 if (!this.currentProjectPath || !this.currentWorkspaceName) {

Callers 3

ensureReadyMethod · 0.95
forkWorkspaceMethod · 0.95

Calls 1

getWorkspacePathMethod · 0.65

Tested by

no test coverage detected