mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-17 12:42:17 +00:00
chore: generate
This commit is contained in:
parent
1ac3f09468
commit
2080390ca6
2 changed files with 11 additions and 7 deletions
|
|
@ -132,10 +132,13 @@ export const layer = Layer.effect(
|
|||
cwd: ctx.worktree,
|
||||
})
|
||||
const resolved = result.exitCode === 0 ? path.resolve(ctx.worktree, result.text().trim()) : undefined
|
||||
const vcsDir = resolved
|
||||
? yield* Effect.promise(() => realpath(resolved).catch(() => resolved))
|
||||
: undefined
|
||||
if (vcsDir && !cfgIgnores.includes(".git") && !cfgIgnores.includes(vcsDir) && (!resolved || !cfgIgnores.includes(resolved))) {
|
||||
const vcsDir = resolved ? yield* Effect.promise(() => realpath(resolved).catch(() => resolved)) : undefined
|
||||
if (
|
||||
vcsDir &&
|
||||
!cfgIgnores.includes(".git") &&
|
||||
!cfgIgnores.includes(vcsDir) &&
|
||||
(!resolved || !cfgIgnores.includes(resolved))
|
||||
) {
|
||||
const ignore = (yield* Effect.promise(() => readdir(vcsDir).catch(() => []))).filter(
|
||||
(entry) => entry !== "HEAD",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -285,9 +285,10 @@ describeWatcher("FileWatcher", () => {
|
|||
),
|
||||
)
|
||||
|
||||
yield* Effect.acquireRelease(
|
||||
Effect.succeed(actualGit),
|
||||
(p) => Effect.promise(() => import("fs").then((f) => f.promises.rm(p, { recursive: true, force: true }).catch(() => undefined))),
|
||||
yield* Effect.acquireRelease(Effect.succeed(actualGit), (p) =>
|
||||
Effect.promise(() =>
|
||||
import("fs").then((f) => f.promises.rm(p, { recursive: true, force: true }).catch(() => undefined)),
|
||||
),
|
||||
)
|
||||
|
||||
const head = path.join(dir, ".git", "HEAD")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue