systeminformation 5.14.1 → 5.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/osinfo.js +13 -10
  2. package/package.json +1 -1
package/lib/osinfo.js CHANGED
@@ -263,16 +263,19 @@ function osInfo(callback) {
263
263
  if (_freebsd || _openbsd || _netbsd) {
264
264
 
265
265
  exec('sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod', function (error, stdout) {
266
- if (!error) {
267
- let lines = stdout.toString().split('\n');
268
- result.distro = util.getValue(lines, 'kern.ostype');
269
- result.logofile = getLogoFile(result.distro);
270
- result.release = util.getValue(lines, 'kern.osrelease').split('-')[0];
271
- result.serial = util.getValue(lines, 'kern.uuid');
272
- result.codename = '';
273
- result.codepage = util.getCodepage();
274
- result.uefi = util.getValue(lines, 'machdep.bootmethod').toLowerCase().indexOf('uefi') >= 0;
275
- }
266
+ let lines = stdout.toString().split('\n');
267
+ const distro = util.getValue(lines, 'kern.ostype');
268
+ const logofile = util.getValue(lines, 'kern.ostype');
269
+ const release = util.getValue(lines, 'kern.osrelease').split('-')[0];
270
+ const serial = util.getValue(lines, 'kern.uuid');
271
+ const uefi = util.getValue(lines, 'machdep.bootmethod').toLowerCase().indexOf('uefi') >= 0;
272
+ result.distro = distro || result.distro;
273
+ result.logofile = logofile || result.logofile;
274
+ result.release = release || result.release;
275
+ result.serial = serial || result.serial;
276
+ result.codename = '';
277
+ result.codepage = util.getCodepage();
278
+ result.uefi = uefi || result.uefi;
276
279
  if (callback) {
277
280
  callback(result);
278
281
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.14.1",
3
+ "version": "5.14.2",
4
4
  "description": "Advanced, lightweight system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",