fix(autostart): Use full exe path on macos when LaunchAgent is used (#841)

This commit is contained in:
Vova Yatsyuk
2024-02-28 23:44:55 +02:00
committed by GitHub
parent 0d3b6b8aca
commit c3c55d5b4e
+1 -1
View File
@@ -119,7 +119,7 @@ pub fn init<R: Runtime>(
// exe path to not break it.
let exe_path = current_exe.canonicalize()?.display().to_string();
let parts: Vec<&str> = exe_path.split(".app/").collect();
let app_path = if parts.len() == 2 {
let app_path = if parts.len() == 2 && matches!(macos_launcher, MacosLauncher::AppleScript) {
format!("{}.app", parts.get(0).unwrap().to_string())
} else {
exe_path