osInfo() fix uefi detection (win)
This commit is contained in:
parent
cf14cf9dae
commit
5bde87efab
@ -77,6 +77,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| -------------- | -------------- | -------- |
|
||||
| 5.7.12 | 2021-07-27 | `osInfo()` fix uefi detection (win) |
|
||||
| 5.7.11 | 2021-07-27 | typescript typings fix `bluetoothDevices()` |
|
||||
| 5.7.10 | 2021-07-26 | typescript typings fix `processLoad()` |
|
||||
| 5.7.9 | 2021-07-25 | `uuid()` better regedit path detection (win) |
|
||||
|
||||
@ -56,6 +56,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">5.7.12</th>
|
||||
<td>2021-07-27</td>
|
||||
<td><span class="code">osInfo()</span> fix uefi detection (win)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.7.11</th>
|
||||
<td>2021-07-27</td>
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
<img class="logo" src="assets/logo.png">
|
||||
<div class="title">systeminformation</div>
|
||||
<div class="subtitle"><span id="typed"></span> </div>
|
||||
<div class="version">New Version: <span id="version">5.7.11</span></div>
|
||||
<div class="version">New Version: <span id="version">5.7.12</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">
|
||||
|
||||
@ -365,14 +365,14 @@ function isUefiLinux() {
|
||||
process.nextTick(() => {
|
||||
fs.stat('/sys/firmware/efi', function (err) {
|
||||
if (!err) {
|
||||
resolve(true);
|
||||
return resolve(true);
|
||||
} else {
|
||||
exec('dmesg | grep -E "EFI v"', function (error, stdout) {
|
||||
if (!error) {
|
||||
const lines = stdout.toString().split('\n');
|
||||
resolve(lines.length > 0);
|
||||
return resolve(lines.length > 0);
|
||||
}
|
||||
resolve(false);
|
||||
return resolve(false);
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -387,21 +387,20 @@ function isUefiWindows() {
|
||||
exec('findstr /C:"Detected boot environment" "%windir%\\Panther\\setupact.log"', util.execOptsWin, function (error, stdout) {
|
||||
if (!error) {
|
||||
const line = stdout.toString().split('\n\r')[0];
|
||||
resolve(line.toLowerCase().indexOf('efi') >= 0);
|
||||
return;
|
||||
return resolve(line.toLowerCase().indexOf('efi') >= 0);
|
||||
} else {
|
||||
exec('echo %firmware_type%', util.execOptsWin, function (error, stdout) {
|
||||
if (!error) {
|
||||
const line = stdout.toString() || '';
|
||||
resolve(line.toLowerCase().indexOf('efi') >= 0);
|
||||
return resolve(line.toLowerCase().indexOf('efi') >= 0);
|
||||
}
|
||||
resolve(false);
|
||||
return resolve(false);
|
||||
});
|
||||
}
|
||||
resolve(false);
|
||||
return resolve(false);
|
||||
});
|
||||
} catch (e) {
|
||||
resolve(false);
|
||||
return resolve(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -1015,18 +1014,18 @@ function shell(callback) {
|
||||
process.nextTick(() => {
|
||||
if (_windows) {
|
||||
resolve('cmd');
|
||||
} else {
|
||||
let result = '';
|
||||
exec('echo $SHELL', function (error, stdout) {
|
||||
if (!error) {
|
||||
result = stdout.toString().split('\n')[0];
|
||||
}
|
||||
if (callback) {
|
||||
callback(result);
|
||||
}
|
||||
resolve(result);
|
||||
});
|
||||
}
|
||||
|
||||
let result = '';
|
||||
exec('echo $SHELL', function (error, stdout) {
|
||||
if (!error) {
|
||||
result = stdout.toString().split('\n')[0];
|
||||
}
|
||||
if (callback) {
|
||||
callback(result);
|
||||
}
|
||||
resolve(result);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user