fix(core): ignore unavailable project copy roots (#32234)

This commit is contained in:
James Long 2026-06-13 18:10:59 -04:00 committed by GitHub
commit 409ba229ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -365,6 +365,18 @@ describe("ProjectCopy", () => {
}),
)
it.live("refresh ignores existing directories that are no longer git checkouts", () =>
Effect.gen(function* () {
const input = yield* setup()
yield* Effect.promise(() => fs.rm(path.join(input.sourceDirectory, ".git"), { recursive: true }))
const copy = yield* ProjectCopy.Service
yield* copy.refresh({ projectID: input.projectID })
expect(yield* stored(input.projectID)).toEqual([{ directory: input.sourceDirectory, strategy: null }])
}),
)
it.live("refresh with no roots is a no-op", () =>
Effect.gen(function* () {
const copy = yield* ProjectCopy.Service