File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 22import { dialog , nativeImage } from 'electron' ;
33import { EventEmitter } from 'events' ;
44import path from 'path' ;
5+ import os from 'os' ;
56import fs from 'fs' ;
67import { localized } from '../intl' ;
78
@@ -49,6 +50,15 @@ export default class AutoUpdateManager extends EventEmitter {
4950 channel : this . preferredChannel ,
5051 } ;
5152
53+ // If we're on the x64 Mac build, but the machine has an Apple-branded
54+ // processor, switch the user to the arm64 build.
55+ if ( params . platform === 'darwin' && process . arch === 'x64' ) {
56+ const cpus = os . cpus ( ) ;
57+ if ( cpus . length && cpus [ 0 ] . model . startsWith ( 'Apple ' ) ) {
58+ params . arch = 'arm64' ;
59+ }
60+ }
61+
5262 let host = `updates.getmailspring.com` ;
5363 if ( this . config . get ( 'env' ) === 'staging' ) {
5464 host = `updates-staging.getmailspring.com` ;
You can’t perform that action at this time.
0 commit comments