chore: generate
This commit is contained in:
@@ -132,10 +132,13 @@ export const layer = Layer.effect(
|
|||||||
cwd: ctx.worktree,
|
cwd: ctx.worktree,
|
||||||
})
|
})
|
||||||
const resolved = result.exitCode === 0 ? path.resolve(ctx.worktree, result.text().trim()) : undefined
|
const resolved = result.exitCode === 0 ? path.resolve(ctx.worktree, result.text().trim()) : undefined
|
||||||
const vcsDir = resolved
|
const vcsDir = resolved ? yield* Effect.promise(() => realpath(resolved).catch(() => resolved)) : undefined
|
||||||
? yield* Effect.promise(() => realpath(resolved).catch(() => resolved))
|
if (
|
||||||
: undefined
|
vcsDir &&
|
||||||
if (vcsDir && !cfgIgnores.includes(".git") && !cfgIgnores.includes(vcsDir) && (!resolved || !cfgIgnores.includes(resolved))) {
|
!cfgIgnores.includes(".git") &&
|
||||||
|
!cfgIgnores.includes(vcsDir) &&
|
||||||
|
(!resolved || !cfgIgnores.includes(resolved))
|
||||||
|
) {
|
||||||
const ignore = (yield* Effect.promise(() => readdir(vcsDir).catch(() => []))).filter(
|
const ignore = (yield* Effect.promise(() => readdir(vcsDir).catch(() => []))).filter(
|
||||||
(entry) => entry !== "HEAD",
|
(entry) => entry !== "HEAD",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -285,9 +285,10 @@ describeWatcher("FileWatcher", () => {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
yield* Effect.acquireRelease(
|
yield* Effect.acquireRelease(Effect.succeed(actualGit), (p) =>
|
||||||
Effect.succeed(actualGit),
|
Effect.promise(() =>
|
||||||
(p) => Effect.promise(() => import("fs").then((f) => f.promises.rm(p, { recursive: true, force: true }).catch(() => undefined))),
|
import("fs").then((f) => f.promises.rm(p, { recursive: true, force: true }).catch(() => undefined)),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
const head = path.join(dir, ".git", "HEAD")
|
const head = path.join(dir, ".git", "HEAD")
|
||||||
|
|||||||
Reference in New Issue
Block a user