Browse Source

fix(desktop): use current_binary() to support symlinked executables (#7102)

Jérôme Benoit 1 month ago
parent
commit
bb09df0c77
1 changed files with 3 additions and 2 deletions
  1. 3 2
      packages/desktop/src-tauri/src/cli.rs

+ 3 - 2
packages/desktop/src-tauri/src/cli.rs

@@ -10,8 +10,9 @@ fn get_cli_install_path() -> Option<std::path::PathBuf> {
 }
 
 pub fn get_sidecar_path() -> std::path::PathBuf {
-    tauri::utils::platform::current_exe()
-        .expect("Failed to get current exe")
+    // Get binary with symlinks support
+    tauri::process::current_binary()
+        .expect("Failed to get current binary")
         .parent()
         .expect("Failed to get parent dir")
         .join("opencode-cli")