mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-16 01:22:58 +00:00
chore: generate
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user