[PR #7102] fix(desktop): use current_binary() to support symlinked executables #12244

Closed
opened 2026-02-16 18:17:10 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7102

State: closed
Merged: Yes


Summary

Replace tauri::utils::platform::current_exe() with tauri::process::current_binary() in get_sidecar_path() to resolve symlinks properly.

Fixes crash when running from Nix store paths or other symlinked installations.

Changes

  • packages/desktop/src-tauri/src/cli.rs: Use tauri::process::current_binary() instead of tauri::utils::platform::current_exe()

Context

The previous implementation rejected symlinked executables on macOS/Windows for security reasons, causing crashes when the desktop app was installed via Nix or other package managers that use symlinks.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7102 **State:** closed **Merged:** Yes --- ## Summary Replace `tauri::utils::platform::current_exe()` with `tauri::process::current_binary()` in `get_sidecar_path()` to resolve symlinks properly. Fixes crash when running from Nix store paths or other symlinked installations. ## Changes - `packages/desktop/src-tauri/src/cli.rs`: Use `tauri::process::current_binary()` instead of `tauri::utils::platform::current_exe()` ## Context The previous implementation rejected symlinked executables on macOS/Windows for security reasons, causing crashes when the desktop app was installed via Nix or other package managers that use symlinks.
yindo added the pull-request label 2026-02-16 18:17:10 -05:00
yindo closed this issue 2026-02-16 18:17:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12244