powerShell() Windows 7 fix compatibility issues (windows)

This commit is contained in:
Sebastian Hildebrandt 2025-12-29 15:33:38 +01:00
parent d7c1fd8aa7
commit 94aa730f88
5 changed files with 5 additions and 3 deletions

View File

@ -90,7 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.28.4 | 2025-12-29 | `powerShwll()` Windows 7 fix compatibility issues (windows) |
| 5.28.4 | 2025-12-29 | `powerShell()` Windows 7 fix compatibility issues (windows) |
| 5.28.3 | 2025-12-28 | `processes()`, `processLoad()` fix command line parsing (windows) |
| 5.28.2 | 2025-12-27 | `networkConnections()` fix missing PIDs ss command (linux) |
| 5.28.1 | 2025-12-26 | `networkInterface()` fix secondary and link-local ip (linux, macOS) |

View File

@ -60,7 +60,7 @@
<tr>
<th scope="row">5.28.4</th>
<td>2025-12-28</td>
<td><span class="code">powerShell()</span> Windows 7 fix compatibility issues (windows)</td>
<td><span class="code">powerShell()</span> Windows 7 fixed compatibility issues (windows)</td>
</tr>
<tr>
<th scope="row">5.28.3</th>

View File

@ -204,7 +204,7 @@
</div>
<div class="row number-section">
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">19,657</div>
<div class="numbers">19,659</div>
<div class="title">Lines of code</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">

View File

@ -195,6 +195,7 @@ function fsSize(drive, callback) {
resolve(data);
} else {
exec('df -kPT 2>/dev/null', { maxBuffer: 1024 * 1024 }, (error, stdout) => {
// fixed issue alpine fallback
const lines = filterLines(stdout);
data = parseDf(lines);
if (callback) {

View File

@ -509,6 +509,7 @@ function powerShell(cmd) {
process.nextTick(() => {
try {
const osVersion = os.release().split('.').map(Number);
// windows 7 compatibility issue
const spanOptions =
osVersion[0] < 10
? ['-NoProfile', '-NoLogo', '-InputFormat', 'Text', '-NoExit', '-ExecutionPolicy', 'Unrestricted', '-Command', '-']