summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorBrendan Allan <[email protected]>2026-04-15 10:56:22 +0800
committerGitHub <[email protected]>2026-04-15 10:56:22 +0800
commitf44aa02e2677b2b89a1a9f517c0ff8990383deaa (patch)
tree2adf4f0e36983d1e271ccd0113abd7bf1dbb37f7 /packages
parent1ca98046045d6c20481e1191927691961979c5c1 (diff)
downloadopencode-f44aa02e2677b2b89a1a9f517c0ff8990383deaa.tar.gz
opencode-f44aa02e2677b2b89a1a9f517c0ff8990383deaa.zip
fix(desktop): chdir to homedir on macOS to fix ripgrep issues (#22537)
Diffstat (limited to 'packages')
-rw-r--r--packages/desktop-electron/src/main/index.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/desktop-electron/src/main/index.ts b/packages/desktop-electron/src/main/index.ts
index 89e7c61ac..946e01e32 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<string, string> = {