Răsfoiți Sursa

fix: drop absolute flag to resolve issues when using older git versions

Aiden Cline 2 luni în urmă
părinte
comite
f6262460ff
1 a modificat fișierele cu 4 adăugiri și 4 ștergeri
  1. 4 4
      packages/opencode/src/project/project.ts

+ 4 - 4
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,