Skip to content

Commit 921db43

Browse files
Fix typo, replace egrep with grep -E
1 parent b49afc1 commit 921db43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/commands/test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ async function getPlatform(logsOpt) {
127127
const cpuCore = os.cpus()[0]
128128
const isM1 = cpuCore.model.includes("Apple M1")
129129
const linuxInfo = type === 'Linux' ? await getLinuxInfo() : []
130-
const linuxDestro = linuxInfo[0] || type
130+
const linuxDistro = linuxInfo[0] || type
131131
const release = linuxInfo[1] || os.release()
132132
const majorVersion = parseInt(linuxInfo[1]) || semver.major(release)
133133

134134
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}`)
136136
}
137137

138138
if (arch === 'x64' || (arch === 'arm64' && isM1)) {
@@ -161,7 +161,7 @@ async function getPlatform(logsOpt) {
161161

162162
async function getLinuxInfo() {
163163
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})
165165
return info.replace(/[VERSION=]|[NAME=]|['"]+/g, '').split('\n')
166166
} catch (error) {
167167
print.error(`Error fetching the Linux version:\n ${error}`)

0 commit comments

Comments
 (0)