diff --git a/packages/opencode/src/file/ripgrep.ts b/packages/opencode/src/file/ripgrep.ts index c84d9b522a..3e58d422f6 100644 --- a/packages/opencode/src/file/ripgrep.ts +++ b/packages/opencode/src/file/ripgrep.ts @@ -14,13 +14,14 @@ import { sanitizedProcessEnv } from "@/util/opencode-process" import { which } from "@/util/which" const log = Log.create({ service: "ripgrep" }) -const VERSION = "14.1.1" +const VERSION = "15.1.0" const PLATFORM = { "arm64-darwin": { platform: "aarch64-apple-darwin", extension: "tar.gz" }, "arm64-linux": { platform: "aarch64-unknown-linux-gnu", extension: "tar.gz" }, "x64-darwin": { platform: "x86_64-apple-darwin", extension: "tar.gz" }, "x64-linux": { platform: "x86_64-unknown-linux-musl", extension: "tar.gz" }, "arm64-win32": { platform: "aarch64-pc-windows-msvc", extension: "zip" }, + "ia32-win32": { platform: "i686-pc-windows-msvc", extension: "zip" }, "x64-win32": { platform: "x86_64-pc-windows-msvc", extension: "zip" }, } as const @@ -247,17 +248,20 @@ export const layer: Layer.Layer which("powershell.exe") ?? which("pwsh.exe"))) ?? "powershell.exe" const result = yield* run(shell, [ "-NoProfile", + "-NonInteractive", "-Command", - "Expand-Archive -LiteralPath $args[0] -DestinationPath $args[1] -Force", - archive, - dir, + `$global:ProgressPreference = 'SilentlyContinue'; Expand-Archive -LiteralPath '${archive.replaceAll("'", "''")}' -DestinationPath '${dir.replaceAll("'", "''")}' -Force`, ]) if (result.code !== 0) { return yield* Effect.fail(error(result.stderr || result.stdout, result.code)) @@ -271,12 +275,19 @@ export const layer: Layer.Layer which("rg")) + const system = yield* Effect.sync(() => which(process.platform === "win32" ? "rg.exe" : "rg")) if (system && (yield* fs.isFile(system).pipe(Effect.orDie))) return system const target = path.join(Global.Path.bin, `rg${process.platform === "win32" ? ".exe" : ""}`) @@ -304,17 +315,8 @@ export const layer: Layer.Layer