systeminformation 5.23.20 → 5.23.21

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 +3 -10
  2. package/package.json +1 -1
package/lib/osinfo.js CHANGED
@@ -190,17 +190,10 @@ function getFQDN() {
190
190
  let fqdn = os.hostname;
191
191
  if (_linux || _darwin) {
192
192
  try {
193
- const stdout = execSync('hostnamectl --json short 2>/dev/null', util.execOptsLinux);
194
- const json = JSON.parse(stdout.toString());
195
-
196
- fqdn = json['StaticHostname'];
193
+ const stdout = execSync('hostname -f 2>/dev/null', util.execOptsLinux);
194
+ fqdn = stdout.toString().split(os.EOL)[0];
197
195
  } catch (e) {
198
- try {
199
- const stdout = execSync('hostname -f 2>/dev/null', util.execOptsLinux);
200
- fqdn = stdout.toString().split(os.EOL)[0];
201
- } catch (e) {
202
- util.noop();
203
- }
196
+ util.noop();
204
197
  }
205
198
  }
206
199
  if (_freebsd || _openbsd || _netbsd) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.23.20",
3
+ "version": "5.23.21",
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)",