File tree 1 file changed +11
-4
lines changed
client/desktop/lib/updater
1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,22 @@ const platform = require( 'calypso/desktop/lib/platform' );
11
11
const config = require ( 'calypso/desktop/lib/config' ) ;
12
12
const log = require ( 'calypso/desktop/lib/logger' ) ( 'desktop:updater' ) ;
13
13
14
+ const isMacOSBigSur =
15
+ process . platform === 'darwin' && process . getSystemVersion ( ) . startsWith ( '11' ) ;
16
+
17
+ // FIXME: Auto-restart does not work on MacOS Big Sur and requires an upgrade of Electron v11: https://github.com/electron/electron/issues/25626
18
+ const defaultConfirmLabel = isMacOSBigSur ? 'Update & Quit' : 'Update & Restart' ;
19
+ const defaultDialogMessage = isMacOSBigSur
20
+ ? '{name} {newVersion} is now available — you have {currentVersion}.\n\nPlease quit and restart the app to apply changes.'
21
+ : '{name} {newVersion} is now available — you have {currentVersion}. Would you like to update now?' ;
22
+
14
23
class Updater extends EventEmitter {
15
24
constructor ( options ) {
16
25
super ( ) ;
17
26
18
- this . confirmLabel = options . confirmLabel || 'Update & Restart' ;
27
+ this . confirmLabel = options . confirmLabel || defaultConfirmLabel ;
19
28
this . dialogTitle = options . dialogTitle || 'A new version of {name} is available!' ;
20
- this . dialogMessage =
21
- options . dialogMessage ||
22
- '{name} {newVersion} is now available — you have {currentVersion}. Would you like to update now?' ;
29
+ this . dialogMessage = options . dialogMessage || defaultDialogMessage ;
23
30
this . beta = options . beta || false ;
24
31
25
32
this . _version = '' ;
You can’t perform that action at this time.
0 commit comments