JSPM

cli-fail

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 30
  • Score
    100M100P100Q56029F
  • License MIT

Fail with an error message and a correct exit code

Package Exports

  • cli-fail

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cli-fail) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cli-fail Build Status

Fail with an error message and a correct exit code

Install

$ npm install --save cli-fail

Usage

var fail = require('cli-fail')

fail('it broke')
//=> prints "it broke" to console.error and exits with code 1

fail(new Error())
//=> prints err to console.error, then stack, then exits with code 1

API

fail(err)

err

Required
Type: string / error

An error message or full error object to log.

License

MIT © Ben Drucker