File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ async function getPlatform(logsOpt) {
125
125
const type = os . type ( )
126
126
const arch = os . arch ( )
127
127
const cpuCore = os . cpus ( ) [ 0 ]
128
- const isM1 = cpuCore . model . includes ( " Apple M1" )
128
+ const isM1 = ( arch === 'arm64' && / A p p l e ( M 1 | p r o c e s s o r ) / . test ( cpuCore . model ) )
129
129
const linuxInfo = type === 'Linux' ? await getLinuxInfo ( ) : new Map ( )
130
130
const linuxDistro = linuxInfo . get ( 'name' )
131
131
const release = linuxInfo . get ( 'version' ) || os . release ( )
@@ -135,7 +135,7 @@ async function getPlatform(logsOpt) {
135
135
print . info ( `OS type: ${ linuxDistro || type } \nOS arch: ${ arch } \nOS release: ${ release } \nOS major version: ${ majorVersion } \nCPU model: ${ cpuCore . model } ` )
136
136
}
137
137
138
- if ( arch === 'x64' || ( arch === 'arm64' && isM1 ) ) {
138
+ if ( arch === 'x64' || isM1 ) {
139
139
if ( type === 'Darwin' ) {
140
140
if ( majorVersion === 19 ) {
141
141
return 'binary-macos-10.15'
@@ -168,7 +168,7 @@ async function getLinuxInfo() {
168
168
infoArray . forEach ( ( val ) => {
169
169
infoMap . set ( val [ 0 ] . toLowerCase ( ) , val [ 1 ] )
170
170
} ) ;
171
-
171
+
172
172
return infoMap
173
173
} catch ( error ) {
174
174
print . error ( `Error fetching the Linux version:\n ${ error } ` )
You can’t perform that action at this time.
0 commit comments