Explorar o código

fix(tool): fix ripgrep invocation on Windows (#700)

Co-authored-by: Adam <[email protected]>
strager hai 7 meses
pai
achega
4c4739c422
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/opencode/src/file/ripgrep.ts

+ 1 - 1
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}`)