()
| 368 | } |
| 369 | |
| 370 | const cleanupWorktree = async () => { |
| 371 | if (!worktreeInfo) { |
| 372 | return; |
| 373 | } |
| 374 | const result = await removeWorktree({ |
| 375 | repoRoot: worktreeInfo.basePath, |
| 376 | worktreePath: worktreeInfo.worktreePath |
| 377 | }); |
| 378 | if (!result.ok) { |
| 379 | logger.debug(`[RUNNER RUN] Failed to remove worktree ${worktreeInfo.worktreePath}: ${result.error}`); |
| 380 | } |
| 381 | }; |
| 382 | const maybeCleanupWorktree = async (reason: string) => { |
| 383 | if (!worktreeInfo) { |
| 384 | return; |
no test coverage detected