List npm version, too. Just in case.
This commit is contained in:
parent
db51a8841c
commit
8e34fb41ce
8
index.js
8
index.js
|
@ -38,6 +38,7 @@ async function info () {
|
|||
const data = {
|
||||
version : PACKAGE.version,
|
||||
node : null,
|
||||
npm : null,
|
||||
os : null,
|
||||
kernel : null
|
||||
}
|
||||
|
@ -49,6 +50,13 @@ async function info () {
|
|||
log.error(err)
|
||||
}
|
||||
|
||||
try {
|
||||
data.npm = await execAsync('npm -v')
|
||||
data.npm = data.npm.replace(/(\r\n|\n|\r)/gm, '')
|
||||
} catch (err) {
|
||||
log.error(err)
|
||||
}
|
||||
|
||||
try {
|
||||
data.kernel = await execAsync('uname -r')
|
||||
data.kernel = data.kernel.replace(/(\r\n|\n|\r)/gm, '')
|
||||
|
|
Loading…
Reference in New Issue