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 = {
|
const data = {
|
||||||
version : PACKAGE.version,
|
version : PACKAGE.version,
|
||||||
node : null,
|
node : null,
|
||||||
|
npm : null,
|
||||||
os : null,
|
os : null,
|
||||||
kernel : null
|
kernel : null
|
||||||
}
|
}
|
||||||
|
@ -49,6 +50,13 @@ async function info () {
|
||||||
log.error(err)
|
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 {
|
try {
|
||||||
data.kernel = await execAsync('uname -r')
|
data.kernel = await execAsync('uname -r')
|
||||||
data.kernel = data.kernel.replace(/(\r\n|\n|\r)/gm, '')
|
data.kernel = data.kernel.replace(/(\r\n|\n|\r)/gm, '')
|
||||||
|
|
Loading…
Reference in New Issue