systeminformation 5.18.1 → 5.18.3

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.
package/lib/filesystem.js CHANGED
@@ -137,7 +137,7 @@ function fsSize(drive, callback) {
137
137
  }
138
138
  }
139
139
  if (_linux) {
140
- cmd = 'df -lkPTx squashfs';
140
+ cmd = 'export LC_ALL=C; df -lkPTx squashfs; unset LC_ALL';
141
141
  execSync('cat /proc/mounts 2>/dev/null').toString().split('\n').filter(line => {
142
142
  return line.startsWith('/');
143
143
  }).forEach((line) => {
@@ -158,7 +158,7 @@ function fsSize(drive, callback) {
158
158
  return item.fs.toLowerCase().indexOf(drive.toLowerCase()) >= 0 || item.mount.toLowerCase().indexOf(drive.toLowerCase()) >= 0;
159
159
  });
160
160
  }
161
- if (!error || data.length) {
161
+ if ((!error || data.length) && stdout.toString().trim() !== '') {
162
162
  if (callback) {
163
163
  callback(data);
164
164
  }
package/lib/graphics.js CHANGED
@@ -669,7 +669,7 @@ function graphics(callback) {
669
669
  } catch (e) {
670
670
  util.noop();
671
671
  }
672
- stdout = execSync('defaults read /Library/Preferences/com.apple.windowserver.plist 2>/dev/null;defaults read /Library/Preferences/com.apple.windowserver.displays.plist 2>/dev/null; echo ""');
672
+ stdout = execSync('defaults read /Library/Preferences/com.apple.windowserver.plist 2>/dev/null;defaults read /Library/Preferences/com.apple.windowserver.displays.plist 2>/dev/null; echo ""', { maxBuffer: 1024 * 20000 });
673
673
  const output = (stdout || '').toString();
674
674
  const obj = util.plistReader(output);
675
675
  if (obj['DisplayAnyUserSets'] && obj['DisplayAnyUserSets']['Configs'] && obj['DisplayAnyUserSets']['Configs'][0] && obj['DisplayAnyUserSets']['Configs'][0]['DisplayConfig']) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.18.1",
3
+ "version": "5.18.3",
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)",