File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
client/desktop/lib/updater Expand file tree Collapse file tree 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' );
1111const config = require ( 'calypso/desktop/lib/config' ) ;
1212const log = require ( 'calypso/desktop/lib/logger' ) ( 'desktop:updater' ) ;
1313
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+
1423class Updater extends EventEmitter {
1524 constructor ( options ) {
1625 super ( ) ;
1726
18- this . confirmLabel = options . confirmLabel || 'Update & Restart' ;
27+ this . confirmLabel = options . confirmLabel || defaultConfirmLabel ;
1928 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 ;
2330 this . beta = options . beta || false ;
2431
2532 this . _version = '' ;
You can’t perform that action at this time.
0 commit comments