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 @@ -127,12 +127,12 @@ async function getPlatform(logsOpt) {
127
127
const cpuCore = os . cpus ( ) [ 0 ]
128
128
const isM1 = cpuCore . model . includes ( "Apple M1" )
129
129
const linuxInfo = type === 'Linux' ? await getLinuxInfo ( ) : [ ]
130
- const linuxDestro = linuxInfo [ 0 ] || type
130
+ const linuxDistro = linuxInfo [ 0 ] || type
131
131
const release = linuxInfo [ 1 ] || os . release ( )
132
132
const majorVersion = parseInt ( linuxInfo [ 1 ] ) || semver . major ( release )
133
133
134
134
if ( logsOpt ) {
135
- print . info ( `OS: ${ linuxDestro || type } \nOS arch: ${ arch } \nOS release: ${ release } \nOS major version: ${ majorVersion } \nCPU model: ${ cpuCore . model } ` )
135
+ print . info ( `OS: ${ linuxDistro || type } \nOS arch: ${ arch } \nOS release: ${ release } \nOS major version: ${ majorVersion } \nCPU model: ${ cpuCore . model } ` )
136
136
}
137
137
138
138
if ( arch === 'x64' || ( arch === 'arm64' && isM1 ) ) {
@@ -161,7 +161,7 @@ async function getPlatform(logsOpt) {
161
161
162
162
async function getLinuxInfo ( ) {
163
163
try {
164
- let info = await system . run ( "cat /etc/*-release | egrep -e '(^VERSION|^NAME)='" , { trim : true } )
164
+ let info = await system . run ( "cat /etc/*-release | grep -E '(^VERSION|^NAME)='" , { trim : true } )
165
165
return info . replace ( / [ V E R S I O N = ] | [ N A M E = ] | [ ' " ] + / g, '' ) . split ( '\n' )
166
166
} catch ( error ) {
167
167
print . error ( `Error fetching the Linux version:\n ${ error } ` )
You can’t perform that action at this time.
0 commit comments