Skip to content

Commit 81d204a

Browse files
committed
Self-update fixes
1 parent 8009446 commit 81d204a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

MistServerManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,10 +639,10 @@ class MistServerManager {
639639
return
640640
}
641641

642-
// Relaunch new version
643-
let executablePath = currentApp + "/Contents/MacOS/MistTray"
642+
// Relaunch via open(1) for proper LaunchServices handling
644643
let relaunchTask = Process()
645-
relaunchTask.executableURL = URL(fileURLWithPath: executablePath)
644+
relaunchTask.executableURL = URL(fileURLWithPath: "/bin/sh")
645+
relaunchTask.arguments = ["-c", "sleep 1 && open '\(currentApp)'"]
646646
try? relaunchTask.run()
647647

648648
DispatchQueue.main.async { completion(true) }

0 commit comments

Comments
 (0)