(params: WorkspaceInitParams)
| 2499 | } |
| 2500 | |
| 2501 | async initWorkspace(params: WorkspaceInitParams): Promise<WorkspaceInitResult> { |
| 2502 | // Disable git hooks for untrusted projects (prevents post-checkout execution) |
| 2503 | const nhp = gitNoHooksPrefix(params.trusted); |
| 2504 | |
| 2505 | return runWorkspaceInitHook({ |
| 2506 | params, |
| 2507 | runtimeType: "ssh", |
| 2508 | hookCheckPath: params.projectPath, |
| 2509 | beforeHook: async () => { |
| 2510 | await this.prepareWorkspaceCheckout(params, nhp); |
| 2511 | }, |
| 2512 | runHook: async ({ muxEnv, initLogger, abortSignal }) => { |
| 2513 | // Expand tilde in hook path (quoted paths don't auto-expand on remote). |
| 2514 | const hookPath = expandTildeForSSH(`${params.workspacePath}/.mux/init`); |
| 2515 | await runInitHookOnRuntime( |
| 2516 | this, |
| 2517 | hookPath, |
| 2518 | params.workspacePath, |
| 2519 | muxEnv, |
| 2520 | initLogger, |
| 2521 | abortSignal |
| 2522 | ); |
| 2523 | }, |
| 2524 | }); |
| 2525 | } |
| 2526 | |
| 2527 | /** |
| 2528 | * Try to create the workspace via a single fused SSH command (warm fast-path). |
nothing calls this directly
no test coverage detected