File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,9 @@ public enum Environment {
4343
4444 public static var fetchCurrentProjectRootURL : ( _ fileURL: URL ? ) async throws
4545 -> URL ? = { fileURL in
46- if let xcode = ActiveApplicationMonitor . activeXcode {
46+ if let xcode = ActiveApplicationMonitor . activeXcode
47+ ?? ActiveApplicationMonitor . latestXcode
48+ {
4749 let application = AXUIElementCreateApplication ( xcode. processIdentifier)
4850 let focusedWindow = application. focusedWindow
4951 for child in focusedWindow? . children ?? [ ] {
@@ -77,7 +79,9 @@ public enum Environment {
7779 }
7880
7981 public static var fetchCurrentFileURL : ( ) async throws -> URL = {
80- guard let xcode = ActiveApplicationMonitor . activeXcode else {
82+ guard let xcode = ActiveApplicationMonitor . activeXcode
83+ ?? ActiveApplicationMonitor . latestXcode
84+ else {
8185 throw FailedToFetchFileURLError ( )
8286 }
8387
You can’t perform that action at this time.
0 commit comments