3.2.0 • Published 11 months ago

suppress-exit-code v3.2.0

Weekly downloads
2,786
License
MIT
Repository
github
Last release
11 months ago

suppress-exit-code

Cross-platform CLI wrapper that runs any command and exits with zero

npm

## exits with non-zero
crazy-broken-command --some-arg=42

## exits with zero, stdout and stderr streams are kept as is
suppress-exit-code crazy-broken-command --some-arg=42

Motivation: https://github.com/okonet/lint-staged/issues/616

Installation

npm install --dev suppress-exit-code
## or
yarn add --dev suppress-exit-code

Possible improvements

Feel free to contribute with a PR if you need these extra features (they are possible, but are not implemented yet):

## keep exit code unless it matches a given whitelist
suppress-exit-code --only=1,2,3 crazy-broken-command --some-arg=42
## make sure nothing is ever printed to the standard error stream
## (helps when running a subcommand in sensible environments)
suppress-exit-code --stderr=pipe-to-stdout crazy-broken-command --some-arg=42
suppress-exit-code --stderr=suppress crazy-broken-command --some-arg=42
3.2.0

11 months ago

3.1.0

2 years ago

3.0.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

3 years ago

0.1.0

5 years ago