File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -53,16 +53,19 @@ function getPlatform() {
53
53
const type = os . type ( ) ;
54
54
const arch = os . arch ( ) ;
55
55
const release = os . release ( ) ;
56
+ const cpuCore = os . cpus ( ) [ 0 ] ;
56
57
const majorVersion = release . substr ( 0 , release . indexOf ( '.' ) ) ;
57
58
58
- if ( arch === 'x64' ) {
59
+ if ( arch === 'x64' || ( arch === 'arm64' && cpuCore . model . includes ( "M1" ) ) ) {
59
60
if ( type === 'Darwin' ) {
60
61
if ( majorVersion === '19' ) {
61
62
return 'binary-macos-10.15' ;
62
63
} else if ( majorVersion === '18' ) {
63
64
return 'binary-macos-10.14' ;
65
+ } else if ( cpuCore . model . includes ( "M1" ) ) {
66
+ return 'binary-macos-11-m1' ;
64
67
}
65
- return 'binary-macos-11'
68
+ return 'binary-macos-11' ;
66
69
} else if ( type === 'Linux' ) {
67
70
if ( majorVersion === '18' ) {
68
71
return 'binary-linux-18' ;
You can’t perform that action at this time.
0 commit comments