Browse Source

optimized checkPlatformExact checking

develop
ray-1337 3 years ago
parent
commit
462a43cd53
  1. 3
      src/Util.js

3
src/Util.js

@ -71,7 +71,8 @@ module.exports.checkPlatformExact = function () {
// return true; // return true;
try { try {
return execSync("cat /etc/*release | grep -E ^NAME")?.toString("utf-8").split('=').pop().replace(/(")/gi, "").toLowerCase() == "ubuntu" ? true : false; const check = execSync("cat /etc/*release | grep -E ^NAME");
return check?.toString("utf-8").match("Ubuntu") ? true : false;
} catch (e) { } catch (e) {
console.error(e); console.error(e);
return false; return false;

Loading…
Cancel
Save