blob: 4edf0a6cdf8bb01279be885c7aa279c213afe6c4 [file] [log] [blame]
'use strict';
const childProcess = require('child_process');
class Subprocess {
execute(command) {
return new Promise((resolve, reject) => {
childProcess.execFile(command[0], command.slice(1), (error, stdout, stderr) => {
if (error)
reject(stderr);
else
resolve(stdout);
});
});
}
};
if (typeof module != 'undefined')
module.exports.Subprocess = Subprocess;