run.js
/**
 * Execute simple shell command (async wrapper).
 * @param {String} cmd
 * @return {Object} { stdout: String, stderr: String }
 */
Execute simple shell command (async wrapper).
Execute simple shell command ( async wrapper ) .
async function sh(cmd) {
  return new Promise(function (resolve, reject) {
    exec(cmd, (err, stdout, stderr) => {
      if (err) {
        reject(err);
      } else {
        resolve({ stdout, stderr });
      }
    });
  });
}
async function sh ( cmd ) { return new Promise ( function ( resolve , reject ) { exec ( cmd , ( err , stdout , stderr ) => { if ( err ) { reject ( err ) ; } else { resolve ( { stdout , stderr } ) ; } } ) ; } ) ; }
Execute simple shell command (async wrapper).
Execute simple shell command ( async wrapper ) .