fix(autostart): Fix LaunchAgent macOS autostart (#1118)

* Fix LaunchAgent macOS autostart

* Add .changes
pull/1120/head
venkr 1 year ago committed by GitHub
parent 4cd81126fd
commit a2339195aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
"autostart": patch
---
Fix LaunchAgent-based autostart for macOS.

@ -129,7 +129,8 @@ 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.first().unwrap())
} else {
exe_path

Loading…
Cancel
Save