-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(desktop): use current_binary() to support symlinked executables #7102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(desktop): use current_binary() to support symlinked executables #7102
Conversation
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.
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
There was a problem hiding this 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, ouch, triggers a build failure, missing |
…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
…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.
…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.
…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.
Summary
Replace
tauri::utils::platform::current_exe()withtauri::process::current_binary()inget_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: Usetauri::process::current_binary()instead oftauri::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.