mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix: workree cmd
This commit is contained in:
parent
7447460b5a
commit
4012d97a41
1 changed files with 6 additions and 8 deletions
|
|
@ -62,14 +62,12 @@ export namespace Project {
|
|||
await Storage.write<Info>(["project", "global"], project)
|
||||
return project
|
||||
}
|
||||
worktree = path.dirname(
|
||||
await $`git rev-parse --path-format=absolute --git-common-dir`
|
||||
.quiet()
|
||||
.nothrow()
|
||||
.cwd(worktree)
|
||||
.text()
|
||||
.then((x) => x.trim()),
|
||||
)
|
||||
worktree = await $`git rev-parse --path-format=absolute --show-toplevel`
|
||||
.quiet()
|
||||
.nothrow()
|
||||
.cwd(worktree)
|
||||
.text()
|
||||
.then((x) => x.trim())
|
||||
const project: Info = {
|
||||
id,
|
||||
worktree,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue