From 39a68379b63ce12911f631bbe3ae52c6ed8b0ec3 Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Mon, 7 Apr 2025 12:42:03 -0700 Subject: [PATCH] utmctl: detect path if UTM.app was renamed Fixes #7094 --- utmctl/UTMCtl.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utmctl/UTMCtl.swift b/utmctl/UTMCtl.swift index 2b78dd72..fa6b209c 100644 --- a/utmctl/UTMCtl.swift +++ b/utmctl/UTMCtl.swift @@ -93,7 +93,7 @@ extension UTMAPICommand { private var utmAppUrl: URL { if let executableURL = Bundle.main.executableURL?.resolvingSymlinksInPath() { let utmURL = executableURL.deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent() - if utmURL.lastPathComponent == "UTM.app" { + if utmURL.pathExtension == "app" { return utmURL } }