We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fde0b39 commit 89064c3Copy full SHA for 89064c3
1 file changed
packages/opencode/src/worktree/index.ts
@@ -411,8 +411,13 @@ export namespace Worktree {
411
if (key === directory) return item
412
}
413
})()
414
+
415
if (!entry?.path) {
- throw new RemoveFailedError({ message: "Worktree not found" })
416
+ const directoryExists = await exists(directory)
417
+ if (directoryExists) {
418
+ await fs.rm(directory, { recursive: true, force: true })
419
+ }
420
+ return true
421
422
423
const removed = await $`git worktree remove --force ${entry.path}`.quiet().nothrow().cwd(Instance.worktree)
0 commit comments