EZPPLauncher/terminalUtil.js

16 lines
386 B
JavaScript
Raw Permalink Normal View History

2022-10-24 04:36:03 +00:00
const exec = require('child_process').exec;
const execPromise = function (cmd) {
return new Promise(function (resolve, reject) {
exec(cmd, function (err, stdout) {
if (err) return reject(err);
resolve(stdout);
});
});
}
const execCommand = async (command) => {
return await execPromise(command);
}
module.exports = { execCommand };