From 643f87d3669f801b2d7977d68b3b055a95a91b89 Mon Sep 17 00:00:00 2001 From: nimbold <11913706+nimbold@users.noreply.github.com> Date: Thu, 4 Jun 2026 02:21:41 +0330 Subject: [PATCH] fix(ui): use Process to invoke open instead of NSWorkspace to avoid url encoding the fragment hash --- Sources/Firelink/SettingsView.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Sources/Firelink/SettingsView.swift b/Sources/Firelink/SettingsView.swift index 66d8c25..3abc3d3 100644 --- a/Sources/Firelink/SettingsView.swift +++ b/Sources/Firelink/SettingsView.swift @@ -727,8 +727,6 @@ private struct IntegrationSettingsPane: View { } private func openFirefoxDebugging() { - guard let url = URL(string: "about:debugging#/runtime/this-firefox") else { return } - let bundleIDs = [ "org.mozilla.firefoxdeveloperedition", "org.mozilla.firefox", @@ -738,13 +736,17 @@ private struct IntegrationSettingsPane: View { let workspace = NSWorkspace.shared for id in bundleIDs { if let appURL = workspace.urlForApplication(withBundleIdentifier: id) { - let config = NSWorkspace.OpenConfiguration() - workspace.open([url], withApplicationAt: appURL, configuration: config, completionHandler: nil) + let process = Process() + process.executableURL = URL(fileURLWithPath: "/usr/bin/open") + process.arguments = ["-a", appURL.path, "about:debugging#/runtime/this-firefox"] + try? process.run() return } } // Fallback - workspace.open(url) + if let fallbackURL = URL(string: "about:debugging#/runtime/this-firefox") { + workspace.open(fallbackURL) + } } }