mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-27 03:21:55 -04:00
12 lines
368 B
TypeScript
12 lines
368 B
TypeScript
import logger from '@pnpm/logger'
|
|
|
|
export default function err (error: Error) {
|
|
// bole passes only the name, message and stack of an error
|
|
// that is why we pass error as a message as well, to pass
|
|
// any additional info
|
|
logger.error(error, error)
|
|
|
|
// Differing exit. Otherwise, the reporter wouldn't show the error
|
|
setTimeout(() => process.exit(1), 0)
|
|
}
|