function execPromise(command) {
  return new Promise((resolve, reject) => {
    exec(command, (error, stdout, stderr) => {
      if (error) {
        reject(error);
      } else if (stderr) {
        reject(stderr.trim());
      }
      resolve(stdout.trim());
    });
  });
}
/** execPromise is promisified exec function from NodeJs child_process
 * @param command: string
 * command is shell command such ls, mkdir and etc...
 */
execPromise is promisified exec function from NodeJs child_process
@param command: string
command is shell command such ls, mkdir and etc
execPromise is promisified exec function from NodeJs child_process @param command : string command is shell command such ls mkdir and etc
function execPromise(command) {
  return new Promise((resolve, reject) => {
    exec(command, (error, stdout, stderr) => {
      if (error) {
        reject(error);
      } else if (stderr) {
        reject(stderr.trim());
      }
      resolve(stdout.trim());
    });
  });
}
function execPromise ( command ) { return new Promise ( ( resolve , reject ) => { exec ( command , ( error , stdout , stderr ) => { if ( error ) { reject ( error ) ; } else if ( stderr ) { reject ( stderr . trim ( ) ) ; } resolve ( stdout . trim ( ) ) ; } ) ; } ) ; }
execPromise is promisified exec function from NodeJs child_process
 @param command: string
 command is shell command such ls, mkdir and etc...
execPromise is promisified exec function from NodeJs child_process @param command : string command is shell command such ls mkdir and etc ...