File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,12 +27,12 @@ func setupRestartOnUpdate() {
2727 guard let url = Bundle . main. executableURL else { return }
2828 let checker = await FileChangeChecker ( fileURL: url)
2929
30- // If Xcode or Copilot for Xcode is launched , check if the executable of this program is
30+ // If Xcode or Copilot for Xcode is made active , check if the executable of this program is
3131 // changed.
3232 // If changed, restart the launch agent.
3333
3434 let sequence = NSWorkspace . shared. notificationCenter
35- . notifications ( named: NSWorkspace . didLaunchApplicationNotification )
35+ . notifications ( named: NSWorkspace . didActivateApplicationNotification )
3636 for await notification in sequence {
3737 try Task . checkCancellation ( )
3838 guard let app = notification
@@ -56,7 +56,11 @@ func setupRestartOnUpdate() {
5656 do {
5757 try await manager. restartLaunchAgent ( )
5858 } catch {
59- os_log ( . error, " XPC Service failed to restart. %{public}s " , error. localizedDescription)
59+ os_log (
60+ . error,
61+ " XPC Service failed to restart. %{public}s " ,
62+ error. localizedDescription
63+ )
6064 }
6165 #endif
6266 }
You can’t perform that action at this time.
0 commit comments