windows - uefi detection fix
This commit is contained in:
parent
a0f80f670d
commit
b57bfe978f
@ -337,14 +337,14 @@ function isUefiWindows() {
|
||||
return new Promise((resolve) => {
|
||||
process.nextTick(() => {
|
||||
try {
|
||||
exec('type %windir%\\Panther\\setupact.log | findstr "Detected boot environment" ', util.execOptsWin, function (error, stdout) {
|
||||
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('uefi') >= 0);
|
||||
}
|
||||
resolve(false);
|
||||
});
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user