diff options
| author | Aiden Cline <[email protected]> | 2025-12-01 00:23:19 -0600 |
|---|---|---|
| committer | Aiden Cline <[email protected]> | 2025-12-01 00:23:19 -0600 |
| commit | f6262460ff331c960c7e26202ffff17f16cb515a (patch) | |
| tree | faa6bab75859205497caae7b6502d0bc4df3f88f | |
| parent | 560a610384f46f7f2cfab298b215c38463ec8fbc (diff) | |
| download | opencode-f6262460ff331c960c7e26202ffff17f16cb515a.tar.gz opencode-f6262460ff331c960c7e26202ffff17f16cb515a.zip | |
fix: drop absolute flag to resolve issues when using older git versions
| -rw-r--r-- | packages/opencode/src/project/project.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/opencode/src/project/project.ts b/packages/opencode/src/project/project.ts index 74e969145..364d8b247 100644 --- a/packages/opencode/src/project/project.ts +++ b/packages/opencode/src/project/project.ts @@ -75,18 +75,18 @@ export namespace Project { await Storage.write<Info>(["project", "global"], project) return project } - worktree = await $`git rev-parse --path-format=absolute --show-toplevel` + worktree = await $`git rev-parse --show-toplevel` .quiet() .nothrow() .cwd(worktree) .text() - .then((x) => x.trim()) - const vcsDir = await $`git rev-parse --path-format=absolute --git-dir` + .then((x) => path.resolve(worktree, x.trim())) + const vcsDir = await $`git rev-parse --git-dir` .quiet() .nothrow() .cwd(worktree) .text() - .then((x) => x.trim()) + .then((x) => path.resolve(worktree, x.trim())) const project: Info = { id, worktree, |
