Skip to content

Commit d46e6f8

Browse files
committed
Disable Sparkle in UI tests
1 parent 7e7d0e5 commit d46e6f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Maccy/AppDelegate.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
import Cocoa
2+
import Sparkle
23

34
@NSApplicationMain
45
class AppDelegate: NSObject, NSApplicationDelegate {
56
private var hotKey: GlobalHotKey!
67
private var maccy: Maccy!
78

9+
func applicationWillFinishLaunching(_ notification: Notification) {
10+
if ProcessInfo.processInfo.arguments.contains("ui-testing") {
11+
SUUpdater.shared()?.automaticallyChecksForUpdates = false
12+
}
13+
}
14+
815
func applicationDidFinishLaunching(_ aNotification: Notification) {
916
migrateUserDefaults()
1017

0 commit comments

Comments
 (0)