const childProcess = require('child_process');

async function exec(cmd) {
  return new Promise((resolve, reject) => {
    childProcess.exec(cmd, (error, stdout) => error ? reject(error) : resolve(stdout));
  });
}

module.exports = exec;
