Skip to content

Commit f44aa02

Browse files
authored
fix(desktop): chdir to homedir on macOS to fix ripgrep issues (#22537)
1 parent 1ca9804 commit f44aa02

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • packages/desktop-electron/src/main

packages/desktop-electron/src/main/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ import pkg from "electron-updater"
1111
import contextMenu from "electron-context-menu"
1212
contextMenu({ showSaveImageAs: true, showLookUpSelection: false, showSearchWithGoogle: false })
1313

14+
// on macOS apps run in `/` which can cause issues with ripgrep
15+
try {
16+
process.chdir(homedir())
17+
} catch {}
18+
1419
process.env.OPENCODE_DISABLE_EMBEDDED_WEB_UI = "true"
1520

1621
const APP_NAMES: Record<string, string> = {

0 commit comments

Comments
 (0)