From a91fb73c76eb207ccc9b8cc7aa78ebb32056d6af Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 25 Apr 2025 09:09:38 -0700 Subject: [PATCH] Fix warning in RSAppMovementMonitor.swift. --- .../Sources/RSCore/AppKit/RSAppMovementMonitor.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Modules/RSCore/Sources/RSCore/AppKit/RSAppMovementMonitor.swift b/Modules/RSCore/Sources/RSCore/AppKit/RSAppMovementMonitor.swift index 83c1d49fb..7225937a1 100644 --- a/Modules/RSCore/Sources/RSCore/AppKit/RSAppMovementMonitor.swift +++ b/Modules/RSCore/Sources/RSCore/AppKit/RSAppMovementMonitor.swift @@ -128,8 +128,11 @@ public class RSAppMovementMonitor: NSObject { func relaunchFromURL(_ appURL: URL) { // Relaunching is best achieved by requesting that the system launch the app // at the given URL with the "new instance" option to prevent it simply reactivating us. - let _ = try? NSWorkspace.shared.launchApplication(at: appURL, options: .newInstance, configuration: [:]) - NSApp.terminate(self) + let configuration = NSWorkspace.OpenConfiguration() + configuration.createsNewApplicationInstance = true + NSWorkspace.shared.openApplication(at: appURL, configuration: configuration) { _, _ in + NSApp.terminate(self) + } } func defaultHandler() {