Files
pnpm/lib/err.js
Zoltan Kochan b38b65db49 Remove unnecessary polyfills
Promises and Object.assign are available in Node >= 4, so there is no need to have the bluebird and object-assign dependencies.
2016-08-11 01:08:21 +03:00

17 lines
468 B
JavaScript

var chalk = require('chalk')
module.exports = function err (error) {
console.error('')
if (error.host && error.path) {
console.error('' + error.message)
console.error('' + error.method + ' ' + error.host + error.path)
} else {
console.error(chalk.red(' ! ' + (error.message || error)))
if (process.env.DEBUG_PROMISE && error.stack && !error.silent) {
console.error(chalk.red(error.stack))
}
}
console.error('')
process.exit(1)
}