EZPPLauncher/electron/netUtils.js

20 lines
527 B
JavaScript
Raw Normal View History

2024-04-14 15:16:46 +00:00
const { exec } = require("child_process");
async function isNet8Installed() {
return new Promise((resolve, reject) => {
exec("dotnet --version", (error, stdout, stderr) => {
if (error) {
resolve(false);
return;
}
if (stderr) {
resolve(false);
return;
}
const version = stdout.trim();
resolve(version.startsWith("8."));
})
});
}
module.exports = { isNet8Installed };