packages/tools/index.js
function rejectHandler(err) {
  process.stderr.write(`${err.stack || err}\n`);

  if (sh.config.fatal) {
    sh.exit(1);
  }

  return Promise.reject(err);
}
function rejectHandler(err) {
  process.stderr.write(`${err.stack || err}\n`);

  if (sh.config.fatal) {
    sh.exit(1);
  }

  return Promise.reject(err);
}
function rejectHandler ( err ) { process . stderr . write ( ` ${ err . stack || err } \n ` ) ; if ( sh . config . fatal ) { sh . exit ( 1 ) ; } return Promise . reject ( err ) ; }
Print error to stderr and exit process when shelljs "-e" option is set.

@param  {Error}   err error to print.
@return {Promise<void, Error>}
Print error to stderr and exit process when shelljs - e option is set .