File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,6 +163,8 @@ public enum Environment {
163163 Logger . service
164164 . error ( " Trigger command \( name) failed: \( error. localizedDescription) " )
165165 throw error
166+ } else {
167+ return
166168 }
167169 }
168170 } else if let commandMenu = app. menuBar? . child ( title: bundleName) ,
@@ -173,17 +175,18 @@ public enum Environment {
173175 Logger . service
174176 . error ( " Trigger command \( name) failed: \( error. localizedDescription) " )
175177 throw error
178+ } else {
179+ return
176180 }
177- } else {
178- struct CantRunCommand : Error , LocalizedError {
179- let name : String
180- var errorDescription : String ? {
181- " Can't run command \( name) . "
182- }
181+ }
182+ struct CantRunCommand : Error , LocalizedError {
183+ let name : String
184+ var errorDescription : String ? {
185+ " Can't run command \( name) . "
183186 }
184-
185- throw CantRunCommand ( name: name)
186187 }
188+
189+ throw CantRunCommand ( name: name)
187190 } else {
188191 /// check if menu is open, if not, click the menu item.
189192 let appleScript = """
You can’t perform that action at this time.
0 commit comments