mirror of
https://github.com/pnpm/pnpm.git
synced 2026-02-05 04:31:31 -05:00
17 lines
469 B
JavaScript
17 lines
469 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.BLUEBIRD_DEBUG && error.stack && !error.silent) {
|
|
console.error(chalk.red(error.stack))
|
|
}
|
|
}
|
|
console.error('')
|
|
process.exit(1)
|
|
}
|