From b57bfe978f248411864b1a3ba45cbcdc02163f27 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Thu, 16 Jan 2020 14:28:20 +0100 Subject: [PATCH] windows - uefi detection fix --- lib/osinfo.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/osinfo.js b/lib/osinfo.js index 26ab2b1..bc3814a 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -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); } });