system() fixed virtual on WSL2
This commit is contained in:
parent
9ba20d04c9
commit
ac27f7cf59
@ -80,6 +80,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
|||||||
|
|
||||||
| Version | Date | Comment |
|
| Version | Date | Comment |
|
||||||
| -------------- | -------------- | -------- |
|
| -------------- | -------------- | -------- |
|
||||||
|
| 5.9.6 | 2021-10-08 | `system()` fixed virtual on WSL2 |
|
||||||
| 5.9.5 | 2021-10-08 | `battery()` fixed isCharging (windows) |
|
| 5.9.5 | 2021-10-08 | `battery()` fixed isCharging (windows) |
|
||||||
| 5.9.4 | 2021-09-23 | `processes()` fixed memVsz, Memrss (macOS M1) |
|
| 5.9.4 | 2021-09-23 | `processes()` fixed memVsz, Memrss (macOS M1) |
|
||||||
| 5.9.3 | 2021-09-17 | `cpuTemperature()` improved tdie detection (linus) |
|
| 5.9.3 | 2021-09-17 | `cpuTemperature()` improved tdie detection (linus) |
|
||||||
|
|||||||
@ -57,10 +57,15 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">5.9.6</th>
|
||||||
|
<td>2021-10-08</td>
|
||||||
|
<td><span class="code">system()</span> fixed virtual on WSL2</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">5.9.5</th>
|
<th scope="row">5.9.5</th>
|
||||||
<td>2021-10-08</td>
|
<td>2021-10-08</td>
|
||||||
<td><span class="code">battery()</span> fix isCharging (windows)</td>
|
<td><span class="code">battery()</span> fixed isCharging (windows)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">5.9.4</th>
|
<th scope="row">5.9.4</th>
|
||||||
|
|||||||
@ -170,7 +170,7 @@
|
|||||||
<img class="logo" src="assets/logo.png">
|
<img class="logo" src="assets/logo.png">
|
||||||
<div class="title">systeminformation</div>
|
<div class="title">systeminformation</div>
|
||||||
<div class="subtitle"><span id="typed"></span> </div>
|
<div class="subtitle"><span id="typed"></span> </div>
|
||||||
<div class="version">New Version: <span id="version">5.9.5</span></div>
|
<div class="version">New Version: <span id="version">5.9.6</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>
|
<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>
|
||||||
<div class="down">
|
<div class="down">
|
||||||
|
|||||||
@ -122,10 +122,10 @@ function system(callback) {
|
|||||||
util.noop();
|
util.noop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!result.virtual && util.linuxVersion().toLowerCase().indexOf('microsoft') >= 0) {
|
if (!result.virtual && (util.linuxVersion().toLowerCase().indexOf('microsoft') >= 0 || os.release().toLowerCase().indexOf('microsoft') >= 0 || os.release().toLowerCase().endsWith('wsl2'))) {
|
||||||
let versionStr = util.linuxVersion().toLowerCase();
|
let versionStr = util.linuxVersion().toLowerCase();
|
||||||
versionStr = versionStr.split('-')[0].replace('#', '');
|
versionStr = versionStr.split('-')[0].replace('#', '');
|
||||||
const version = parseInt(versionStr, 10) || null;
|
const version = os.release().toLowerCase().endsWith('wsl2') ? 'WSL2' : parseInt(versionStr, 10) || null;
|
||||||
result.virtual = true;
|
result.virtual = true;
|
||||||
result.manufacturer = 'Microsoft';
|
result.manufacturer = 'Microsoft';
|
||||||
result.model = 'WSL';
|
result.model = 'WSL';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user