From 42334f4f35e05ddfe55909df4cc8a3588efcd611 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 29 Dec 2018 17:20:10 +0100 Subject: [PATCH] versions() bugfix nginx --- CHANGELOG.md | 1 + README.md | 1 + lib/osinfo.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 092d47c..a704a79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,6 +100,7 @@ Other changes | Version | Date | Comment | | -------------- | -------------- | -------- | +| 3.53.1 | 2018-12-29 | `versions()` bug fix nginx version | | 3.53.0 | 2018-12-29 | `versions()` added perl, python, gcc | | 3.52.7 | 2018-12-29 | `versions()` bug fix macOS detection | | 3.52.6 | 2018-12-28 | `versions()` bug fix macOS | diff --git a/README.md b/README.md index e5861ee..9b2d888 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ async function cpu() { (last 7 major and minor version releases) +- Version 3.53.0: `versions()` added perl, python, gcc - Version 3.52.0: `cpu()` added physical cores, processors, socket type - Version 3.51.0: `processLoad()` added for windows - Version 3.50.0: `services()` added possibility to specify ALL services "*" for linux/win diff --git a/lib/osinfo.js b/lib/osinfo.js index 00db270..9755961 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -395,7 +395,7 @@ function versions(callback) { functionProcessed(); }); } - exec('nginx -v', function (error, stdout) { + exec('nginx -v 2>&1', function (error, stdout) { if (!error) { const nginx = stdout.toString().split('\n')[0] || ''; result.nginx = (nginx.toLowerCase().split('/')[1] || '').trim();