From 3562c8775b4535e3289b444bab24e852cb23deda Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sat, 3 Jan 2026 10:21:04 +0100 Subject: [PATCH] graphics() fix logging nvidia-smi error (windows) --- CHANGELOG.md | 3 ++- docs/history.html | 5 +++++ docs/index.html | 2 +- lib/graphics.js | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d94ef4d..569785b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,7 +90,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.28.0 | 2026-01-02 | `fsSize()` fix df parsing missing mount points (linux) | +| 5.28.10 | 2026-01-03 | `graphics()` fix logging nvidia-smi error (windows) | +| 5.28.9 | 2026-01-02 | `fsSize()` fix df parsing missing mount points (linux) | | 5.28.8 | 2026-01-01 | `bluetooth()` `battery()` improved enumeration (windows) | | 5.28.7 | 2026-12-31 | `networkInterfaces()` fix wireless speed (linux) | | 5.28.6 | 2025-12-31 | `npx systeminformation` improved output | diff --git a/docs/history.html b/docs/history.html index 3866fb3..49d34b5 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.28.10 + 2026-01-03 + graphics() fix logging nvidia-smi error (windows) + 5.28.9 2026-01-02 diff --git a/docs/index.html b/docs/index.html index c785b5f..fdc5cf3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.28.9
+
New Version: 5.28.10
diff --git a/lib/graphics.js b/lib/graphics.js index ed3c672..931854d 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -462,7 +462,7 @@ function graphics(callback) { options.stdio = ['pipe', 'pipe', 'ignore']; } try { - const sanitized = util.sanitizeShellString(cmd) + (_linux ? ' 2>/dev/null' : ''); + const sanitized = util.sanitizeShellString(cmd) + (_linux ? ' 2>/dev/null' : '') + (_windows ? ' 2> nul' : ''); const res = execSync(sanitized, options).toString(); return res; } catch {