fsSize() improved error handling (linux alpine)

This commit is contained in:
Sebastian Hildebrandt 2023-06-07 20:26:41 +02:00
parent 58b64788a7
commit 7f2cf7a4ce
4 changed files with 8 additions and 2 deletions

View File

@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.18.2 | 2023-06-08 | `fsSize()` improved error handling (linux alpine) |
| 5.18.1 | 2023-06-07 | `networkInterfaces()` cleaned up testVirtualNic |
| 5.18.0 | 2023-06-06 | `fsSize()` added optional drive parameter |
| 5.17.17 | 2023-06-03 | `osInfo()` improved fqdn (linux) |

View File

@ -57,6 +57,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.18.2</th>
<td>2023-06-07</td>
<td><span class="code">fsSize()</span> improved error handling (alpine linux)</td>
</tr>
<tr>
<th scope="row">5.18.1</th>
<td>2023-06-07</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.18.1</span></div>
<div class="version">New Version: <span id="version">5.18.2</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -158,7 +158,7 @@ function fsSize(drive, callback) {
return item.fs.toLowerCase().indexOf(drive.toLowerCase()) >= 0 || item.mount.toLowerCase().indexOf(drive.toLowerCase()) >= 0;
});
}
if ((!error || data.length) && stdout.toString().toLowerCase().indexOf('unrecognized option') === -1) {
if ((!error || data.length) && stdout.toString().trim() !== '') {
if (callback) {
callback(data);
}