Skip to content

Commit bc9ff7e

Browse files
authored
fix: worktree cmd (anomalyco#2870)
1 parent 7447460 commit bc9ff7e

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

‎packages/opencode/src/project/project.ts‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,12 @@ export namespace Project {
6262
await Storage.write<Info>(["project", "global"], project)
6363
return project
6464
}
65-
worktree = path.dirname(
66-
await $`git rev-parse --path-format=absolute --git-common-dir`
67-
.quiet()
68-
.nothrow()
69-
.cwd(worktree)
70-
.text()
71-
.then((x) => x.trim()),
72-
)
65+
worktree = await $`git rev-parse --path-format=absolute --show-toplevel`
66+
.quiet()
67+
.nothrow()
68+
.cwd(worktree)
69+
.text()
70+
.then((x) => x.trim())
7371
const project: Info = {
7472
id,
7573
worktree,

0 commit comments

Comments
 (0)