chore: generate
This commit is contained in:
@@ -181,9 +181,7 @@ const ensureWithServices = Effect.fn("RepositoryCache.ensureWithServices")(funct
|
|||||||
),
|
),
|
||||||
() =>
|
() =>
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
yield* services.fs
|
yield* services.fs.ensureDir(path.dirname(localPath)).pipe(
|
||||||
.ensureDir(path.dirname(localPath))
|
|
||||||
.pipe(
|
|
||||||
Effect.catch((error: unknown) =>
|
Effect.catch((error: unknown) =>
|
||||||
Effect.fail(
|
Effect.fail(
|
||||||
new CacheOperationError({
|
new CacheOperationError({
|
||||||
@@ -203,9 +201,7 @@ const ensureWithServices = Effect.fn("RepositoryCache.ensureWithServices")(funct
|
|||||||
const originReference = origin?.exitCode === 0 ? parseRepositoryReference(origin.text().trim()) : undefined
|
const originReference = origin?.exitCode === 0 ? parseRepositoryReference(origin.text().trim()) : undefined
|
||||||
const reuse = hasGitDir && Boolean(originReference && sameRepositoryReference(originReference, cloneTarget))
|
const reuse = hasGitDir && Boolean(originReference && sameRepositoryReference(originReference, cloneTarget))
|
||||||
if (exists && !reuse) {
|
if (exists && !reuse) {
|
||||||
yield* services.fs
|
yield* services.fs.remove(localPath, { recursive: true }).pipe(
|
||||||
.remove(localPath, { recursive: true })
|
|
||||||
.pipe(
|
|
||||||
Effect.catch((error: unknown) =>
|
Effect.catch((error: unknown) =>
|
||||||
Effect.fail(
|
Effect.fail(
|
||||||
new CacheOperationError({
|
new CacheOperationError({
|
||||||
|
|||||||
Reference in New Issue
Block a user