Skip to content

Conversation

@jerome-benoit
Copy link
Contributor

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.

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.
Copilot AI review requested due to automatic review settings January 6, 2026 17:43
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a crash when the desktop app is launched from symlinked executables (such as Nix store paths) by replacing tauri::utils::platform::current_exe() with tauri::process::current_binary() in the get_sidecar_path() function.

Key Changes:

  • Update to use tauri::process::current_binary() which properly resolves symlinks instead of rejecting them

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adamdotdevin adamdotdevin merged commit bb09df0 into anomalyco:dev Jan 6, 2026
2 checks passed
@jerome-benoit
Copy link
Contributor Author

jerome-benoit commented Jan 6, 2026

@adamdotdevin, ouch, triggers a build failure, missing &Env arg. PR to fix it coming in a few minutes ...

@jerome-benoit jerome-benoit deleted the fix/desktop-symlink-support branch January 6, 2026 18:23
jerome-benoit added a commit to jerome-benoit/opencode that referenced this pull request Jan 6, 2026
…or PRs

Follow-up to anomalyco#7102 which was merged incomplete:
- Use tauri::process::current_binary() instead of tauri::utils::platform::current_exe()
- Pass AppHandle to get_sidecar_path() to provide required &Env parameter
- Update install_cli() and sync_cli() to pass AppHandle through call chain
- Enable nix-desktop workflow on pull_request events for same paths as push
rekram1-node added a commit that referenced this pull request Jan 6, 2026
jerome-benoit added a commit to jerome-benoit/opencode that referenced this pull request Jan 6, 2026
…or PRs

- Fix get_sidecar_path() to use tauri::process::current_binary(&app.env())
- Pass AppHandle through the call chain to support the new API
- Add Manager trait import for app.env() access
- Enable pull_request trigger in nix-desktop workflow for CI on PRs

This completes the fix from PR anomalyco#7102 which was merged with compilation errors.
jerome-benoit added a commit to jerome-benoit/opencode that referenced this pull request Jan 6, 2026
…or PRs

- Fix get_sidecar_path() to use tauri::process::current_binary(&app.env())
- Pass AppHandle through the call chain to support the new API
- Add Manager trait import for app.env() access
- Enable pull_request trigger in nix-desktop workflow for CI on PRs

This completes the fix from PR anomalyco#7102 which was merged with compilation errors.
jerome-benoit added a commit to jerome-benoit/opencode that referenced this pull request Jan 6, 2026
…or PRs

- Fix get_sidecar_path() to use tauri::process::current_binary(&app.env())
- Pass AppHandle through the call chain to support the new API
- Add Manager trait import for app.env() access
- Enable pull_request trigger in nix-desktop workflow for CI on PRs

This completes the fix from PR anomalyco#7102 which was merged with compilation errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants