MCPcopy Index your code
hub / github.com/Waishnav/devspace / openCheckoutWorkspace

Method openCheckoutWorkspace

src/workspaces.ts:163–173  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

161 }
162
163 private async openCheckoutWorkspace(path: string): Promise<WorkspaceContext> {
164 const root = assertAllowedPath(path, this.config.allowedRoots);
165 await mkdir(root, { recursive: true });
166
167 const rootStats = await stat(root);
168 if (!rootStats.isDirectory()) {
169 throw new Error(`Workspace root must be a directory: ${path}`);
170 }
171
172 return this.createWorkspaceContext({ root, mode: "checkout" });
173 }
174
175 private async openWorktreeWorkspace(path: string, baseRef: string | undefined): Promise<WorkspaceContext> {
176 const worktree = await createManagedWorktree({

Callers 1

openWorkspaceMethod · 0.95

Calls 2

assertAllowedPathFunction · 0.85

Tested by

no test coverage detected