From 9edbb4430806e31be4551fdaa704c63715f09e12 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Wed, 1 Sep 2021 00:51:24 +0200 Subject: [PATCH] processes() fix alpine linux --- CHANGELOG.md | 1 + README.md | 2 +- docs/history.html | 5 +++++ docs/index.html | 4 ++-- lib/processes.js | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2443fc..41e0823 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 5.8.7 | 2021-09-01 | `processes()` fix alpine linux | | 5.8.6 | 2021-08-26 | `cpu()` improved detection (win) | | 5.8.5 | 2021-08-26 | `osInfo()` hyper-v detection fix (win VM) | | 5.8.4 | 2021-08-26 | `graphics()` added vendor (macOS) | diff --git a/README.md b/README.md index 0cf3418..a607d82 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ [![Sponsoring][sponsor-badge]][sponsor-url] [![MIT license][license-img]][license-url] -This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 400 versions published, up to 3 mio downloads per month, > 40 mio downloads overall. Thank you to all who contributed to this project! +This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 400 versions published, up to 3 mio downloads per month, > 45 mio downloads overall. Thank you to all who contributed to this project! ## New Version 5.0 diff --git a/docs/history.html b/docs/history.html index bef4e20..f533d2d 100644 --- a/docs/history.html +++ b/docs/history.html @@ -56,6 +56,11 @@ + + 5.8.7 + 2021-09-01 + processes() fix alpine linux + 5.8.6 2021-08-26 diff --git a/docs/index.html b/docs/index.html index 3324ab5..2e56bd5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.8.6
+
New Version: 5.8.7
@@ -211,7 +211,7 @@
Downloads last month
-
465
+
469
Dependents
diff --git a/lib/processes.js b/lib/processes.js index 0145180..7f6e03c 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -689,7 +689,7 @@ function processes(callback) { if (_darwin) { cmd = 'export LC_ALL=C; ps -axo pid,ppid,pcpu,pmem,pri,vsz,rss,nice,lstart,state,tty,user,command -r; unset LC_ALL'; } if (_sunos) { cmd = 'ps -Ao pid,ppid,pcpu,pmem,pri,vsz,rss,nice,stime,s,tty,user,comm'; } exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { - if (!error) { + if (!error && stdout.toString().trim()) { result.list = (parseProcesses(stdout.toString().split('\n'))).slice(); result.all = result.list.length; result.running = result.list.filter(function (e) {