From e9c6a178f859d0c9fe06a4e6c497627eab69077c Mon Sep 17 00:00:00 2001 From: Ethan Dickson Date: Thu, 26 Jun 2025 12:04:08 +1000 Subject: [PATCH] chore: append bundle version to mach service name --- Coder-Desktop/Coder-Desktop/Info.plist | 7 ++++++- Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift | 5 +++-- Coder-Desktop/VPN/Info.plist | 7 ++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Coder-Desktop/Coder-Desktop/Info.plist b/Coder-Desktop/Coder-Desktop/Info.plist index a9555823..654a5179 100644 --- a/Coder-Desktop/Coder-Desktop/Info.plist +++ b/Coder-Desktop/Coder-Desktop/Info.plist @@ -29,7 +29,12 @@ NetworkExtension NEMachServiceName - $(TeamIdentifierPrefix)com.coder.Coder-Desktop.VPN + + $(TeamIdentifierPrefix)com.coder.Coder-Desktop.VPN.$(CURRENT_PROJECT_VERSION) SUPublicEDKey Ae2oQLTcx89/a73XrpOt+IVvqdo+fMTjo3UKEm77VdA= diff --git a/Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift b/Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift index cb8db684..c5e4ea08 100644 --- a/Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift +++ b/Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift @@ -183,6 +183,7 @@ class SystemExtensionDelegate: if existing.bundleVersion == `extension`.bundleVersion { return .replace } + // TODO: Workaround disabled, as we're trying another workaround // To work around the bug described in // https://github.com/coder/coder-desktop-macos/issues/121, // we're going to manually reinstall after the replacement is done. @@ -190,8 +191,8 @@ class SystemExtensionDelegate: // it looks for an extension with the *current* version string. // There's no way to modify the deactivate request to use a different // version string (i.e. `existing.bundleVersion`). - logger.info("App upgrade detected, replacing and then reinstalling") - action = .replacing + // logger.info("App upgrade detected, replacing and then reinstalling") + // action = .replacing return .replace } } diff --git a/Coder-Desktop/VPN/Info.plist b/Coder-Desktop/VPN/Info.plist index 97d4cce6..0040d95c 100644 --- a/Coder-Desktop/VPN/Info.plist +++ b/Coder-Desktop/VPN/Info.plist @@ -9,7 +9,12 @@ NetworkExtension NEMachServiceName - $(TeamIdentifierPrefix)com.coder.Coder-Desktop.VPN + + $(TeamIdentifierPrefix)com.coder.Coder-Desktop.VPN.$(CURRENT_PROJECT_VERSION) NEProviderClasses com.apple.networkextension.packet-tunnel