Comparing version 4.4.0 to 4.4.1
{ | ||
"name": "envinfo", | ||
"version": "4.4.0", | ||
"version": "4.4.1", | ||
"description": "Info about your dev environment for debugging purposes", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/tabrindle/envinfo", |
@@ -10,10 +10,12 @@ const packageJson = require('../package.json'); | ||
console.log(` | ||
d8b .d888 | ||
Y8P d88P" | ||
888 | ||
.d88b. 88888b. 888 888 888 88888b. 888888 .d88b. | ||
d8P Y8b 888 "88b 888 888 888 888 "88b 888 d88""88b | ||
88888888 888 888 Y88 88P 888 888 888 888 888 888 | ||
Y8b. 888 888 Y8bd8P 888 888 888 888 Y88..88P | ||
"Y8888 888 888 Y88P 888 888 888 888 "Y88P" | ||
,,', ,, ,,,,,, ,',, | ||
,,, ,,, ,,, | ||
,, ,,,,, ,,,,,, ,,, ,, ,, .,,,,,, ,,,,,,, ,,,,, ,, | ||
,, ,, ,, ,,, ,,, ,, ,,, ,, ,,, ,,, ,, ,,, ,,, ,, | ||
,,, ,, .,, ,,, ,, ,,, ,, ,, ,,, ,, ,, ,, ,, ,,, | ||
,, ,,,,,,,,,, ,,, ,, ,, ,, ,, ,,, ,, ,, ,, ,, ,, | ||
,, ,,, ,,, ,, ,,,,, ,, ,,, ,, ,, ,,, ,,, ,, | ||
,, ,,,,,,, ,,, ,, ,,, ,, ,,, ,, ,, ,,,,,,, ,, | ||
,,, ,,, | ||
,,,' ',,, | ||
@@ -20,0 +22,0 @@ VERSION: ${packageJson.version} |
@@ -163,3 +163,3 @@ const childProcess = require('child_process'); | ||
bashPath = which.sync('bash'); | ||
bashVersion = utils.run(`${bashPath} --version`).match(/\d+(\.\d+)+/)[0]; | ||
bashVersion = utils.run(`${bashPath} --version`).match(utils.versionRegex)[0]; | ||
} catch (error) { | ||
@@ -249,11 +249,10 @@ bashVersion = 'Not Found'; | ||
function getShell() { | ||
var shell; | ||
try { | ||
if (process.env.SHELL.indexOf('bash') > 0) | ||
shell = utils.run(process.env.SHELL + ' --version').match(/\d+(\.\d+)+/)[0]; | ||
} catch (error) { | ||
shell = 'Not Found'; | ||
} | ||
return process.env.SHELL + ' - ' + shell; | ||
function getShell(shellBinary) { | ||
shellBinary = shellBinary || process.env.SHELL; | ||
const shellVersion = utils.customGenericVersionFunction( | ||
() => utils.run(`${shellBinary} --version`).match(utils.versionRegex)[0] | ||
); | ||
return (shellBinary && shellVersion && `${shellBinary} - ${shellVersion}`) || `¯\\_(ツ)_/¯`; | ||
} | ||
@@ -260,0 +259,0 @@ |
@@ -16,3 +16,3 @@ var path = require('path'); | ||
function customGenericVersionFunction(fn, msg) { | ||
if (!msg) msg = 'Not Found'; | ||
if (msg === undefined) msg = 'Not Found'; | ||
var version; | ||
@@ -86,2 +86,4 @@ try { | ||
const versionRegex = /\d+\.[\d+|\.]+/; | ||
module.exports = { | ||
@@ -101,2 +103,3 @@ customGenericVersionFunction: customGenericVersionFunction, | ||
uniq: uniq, | ||
versionRegex: versionRegex, | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
420139
1043
68