summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorstrager <[email protected]>2025-07-08 16:36:26 -0400
committerGitHub <[email protected]>2025-07-08 15:36:26 -0500
commit4c4739c422edd0b43275b38aa1a031a0626f995d (patch)
treed14427a45a0b6e2ccfb465f090cc2caa3ccdd2ff
parent2d8b90a6ff797fa42462122505c1d6f8ee29c70a (diff)
downloadopencode-4c4739c422edd0b43275b38aa1a031a0626f995d.tar.gz
opencode-4c4739c422edd0b43275b38aa1a031a0626f995d.zip
fix(tool): fix ripgrep invocation on Windows (#700)
Co-authored-by: Adam <[email protected]>
-rw-r--r--packages/opencode/src/file/ripgrep.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/file/ripgrep.ts b/packages/opencode/src/file/ripgrep.ts
index 379dc4ad3..c5f2cb798 100644
--- a/packages/opencode/src/file/ripgrep.ts
+++ b/packages/opencode/src/file/ripgrep.ts
@@ -187,7 +187,7 @@ export namespace Ripgrep {
export async function files(input: { cwd: string; query?: string; glob?: string; limit?: number }) {
const commands = [
- `${await filepath()} --files --follow --hidden --glob='!.git/*' ${input.glob ? `--glob='${input.glob}'` : ``}`,
+ `${$.escape(await filepath())} --files --follow --hidden --glob='!.git/*' ${input.glob ? `--glob='${input.glob}'` : ``}`,
]
if (input.query) commands.push(`${await Fzf.filepath()} --filter=${input.query}`)
if (input.limit) commands.push(`head -n ${input.limit}`)