systeminformation
Advanced tools
Comparing version 5.17.14 to 5.17.15
@@ -1056,3 +1056,3 @@ 'use strict'; | ||
ifaces[dev].forEach(function (details) { | ||
if (details && details.mac && details.mac !== '00:00:00:00:00:00') { | ||
if (details?.mac && details.mac !== '00:00:00:00:00:00') { | ||
const mac = details.mac.toLowerCase(); | ||
@@ -1059,0 +1059,0 @@ if (macs.indexOf(mac) === -1) { |
@@ -318,3 +318,3 @@ 'use strict'; | ||
const wmicPathArray = execSync('WHERE WMIC', execOptsWin).toString().split('\r\n'); | ||
if (wmicPathArray && wmicPathArray.length) { | ||
if (wmicPathArray?.length) { | ||
wmicPath = wmicPathArray[0]; | ||
@@ -382,3 +382,3 @@ } else { | ||
if (!_psChild) { | ||
_psChild = spawn('powershell.exe', ['-NoLogo', '-InputFormat', 'Text', '-NoExit', '-Command', '-'], { | ||
_psChild = spawn('powershell.exe', ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-Command', '-'], { | ||
stdio: 'pipe', | ||
@@ -390,3 +390,3 @@ windowsHide: true, | ||
}); | ||
if (_psChild && _psChild.pid) { | ||
if (_psChild?.pid) { | ||
_psPersistent = true; | ||
@@ -442,3 +442,3 @@ _psChild.stdout.on('data', function (data) { | ||
try { | ||
if (_psChild && _psChild.pid) { | ||
if (_psChild?.pid) { | ||
_psChild.stdin.write(_psToUTF8 + 'echo ' + _psCmdStart + id + _psIdSeperator + '; ' + os.EOL + cmd + os.EOL + 'echo ' + _psCmdSeperator + os.EOL); | ||
@@ -458,3 +458,3 @@ } | ||
try { | ||
const child = spawn('powershell.exe', ['-NoLogo', '-InputFormat', 'Text', '-NoExit', '-ExecutionPolicy', 'Unrestricted', '-Command', '-'], { | ||
const child = spawn('powershell.exe', ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-ExecutionPolicy', 'Unrestricted', '-Command', '-'], { | ||
stdio: 'pipe', | ||
@@ -472,3 +472,3 @@ windowsHide: true, | ||
} | ||
if (child && child.pid) { | ||
if (child?.pid) { | ||
child.stdout.on('data', function (data) { | ||
@@ -523,3 +523,3 @@ result = result + data.toString('utf8'); | ||
} | ||
if (child && child.pid) { | ||
if (child?.pid) { | ||
child.stdout.on('data', function (data) { | ||
@@ -586,3 +586,3 @@ result += data.toString(); | ||
const pathArray = execSync('WHERE smartctl 2>nul', execOptsWin).toString().split('\r\n'); | ||
if (pathArray && pathArray.length) { | ||
if (pathArray?.length) { | ||
_smartMonToolsInstalled = pathArray[0].indexOf(':\\') >= 0; | ||
@@ -589,0 +589,0 @@ } else { |
{ | ||
"name": "systeminformation", | ||
"version": "5.17.14", | ||
"version": "5.17.15", | ||
"description": "Advanced, lightweight system and OS information library", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
726201