bin/api-docs-upload.js
function runCommand(cmd) {
  return exec(cmd).catch(err =>
    Promise.reject(
      err.message && err.message.indexOf('not found') !== -1
        ? new Error(`${cmd.split(' ')[0]} must be installed to upload`)
        : err
    )
  )
}
function runCommand(cmd) {
  return exec(cmd).catch(err =>
    Promise.reject(
      err.message && err.message.indexOf('not found') !== -1
        ? new Error(`${cmd.split(' ')[0]} must be installed to upload`)
        : err
    )
  )
}
function runCommand ( cmd ) { return exec ( cmd ) . catch ( err => Promise . reject ( err . message && err . message . indexOf ( 'not found' ) !== - 1 ? new Error ( ` ${ cmd . split ( ' ' ) [ 0 ] } ` ) : err ) ) }
Run shell command with error handling.
@param  {String} cmd - Command to run
@return {Promise} Resolves with stdout of running command
@private
Run shell command with error handling .