mirror of
https://github.com/pnpm/pnpm.git
synced 2026-02-02 19:22:52 -05:00
Use lebab to transpile ES5 code to ES6. Use eslint to fix styling issues afterwards. Run all js in strict mode to allow let/const in Node 4.
18 lines
483 B
JavaScript
18 lines
483 B
JavaScript
'use strict'
|
|
const 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)
|
|
}
|