fails

1.1.1 • Public • Published

fails

Detect whether a command fails, and invert exit code.

Install

npm i fails

or

yarn add fails

Use

CLI

fails "echo 'hi'"
# exit code = 1

fails "exit 1"
# exit code = 0

JS

var fails = require('fails')

var command = 'echo "hi"'

function callback (failed) {
  // `failed` is true or false
}

fails(command, callback)

Readme

Keywords

none

Package Sidebar

Install

npm i fails

Weekly Downloads

1

Version

1.1.1

License

ISC

Unpacked Size

1.19 kB

Total Files

4

Last publish

Collaborators

  • adjohnson916
  • andersdjohnson