mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-20 18:57:17 +03:00
fix(core): include hidden files in ripgrep file search (#62577)
This commit is contained in:
committed by
GitHub
Unverified
parent
d327a9662b
commit
ecd2cf2f6f
@@ -68,6 +68,7 @@ const ripgrepLayer = Layer.effect(
|
||||
yield* ripgrep.find({
|
||||
cwd: location.directory,
|
||||
pattern: "*",
|
||||
hidden: true,
|
||||
limit: location.vcs && !home ? Number.MAX_SAFE_INTEGER : 100_000,
|
||||
exclude: home ? [...Protected.names()].map((name) => `${name}/**`) : undefined,
|
||||
onEntry: (entry) =>
|
||||
|
||||
@@ -229,6 +229,7 @@ describe("FileSystemSearch", () => {
|
||||
const search = yield* FileSystemSearch.Service
|
||||
const entries = yield* search.find({ query: "ts", type: "file" })
|
||||
expect(observed?.cwd).toBe(directory)
|
||||
expect(observed?.hidden).toBe(true)
|
||||
expect(entries.map((entry) => entry.path)).toEqual([RelativePath.make("remote.ts")])
|
||||
}).pipe(Effect.provide(layer))
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user