From f44aa02e2677b2b89a1a9f517c0ff8990383deaa Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Wed, 15 Apr 2026 10:56:22 +0800 Subject: [PATCH] fix(desktop): chdir to homedir on macOS to fix ripgrep issues (#22537) --- packages/desktop-electron/src/main/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/desktop-electron/src/main/index.ts b/packages/desktop-electron/src/main/index.ts index 89e7c61ac5..946e01e325 100644 --- a/packages/desktop-electron/src/main/index.ts +++ b/packages/desktop-electron/src/main/index.ts @@ -11,6 +11,11 @@ import pkg from "electron-updater" import contextMenu from "electron-context-menu" contextMenu({ showSaveImageAs: true, showLookUpSelection: false, showSearchWithGoogle: false }) +// on macOS apps run in `/` which can cause issues with ripgrep +try { + process.chdir(homedir()) +} catch {} + process.env.OPENCODE_DISABLE_EMBEDDED_WEB_UI = "true" const APP_NAMES: Record = {