← 全部工具

exitzero

热度 65 更新于 开发与构建

make a CLI command always return an exit status of 0. This can be useful in combination with a `watch` process to ensure things keep running.

npmauto-collected

安装

npm
npm install -g exitzero

通过 npm 安装。

exitzero

make a CLI command always return an exit status of 0. This can be useful in combination with a watch process to ensure things keep running if the target command returns a non-zero exit status.

Installation

npm install exitzero --global

Example

flet@lappy:~$ ls nonexist
ls: cannot access nonexist: No such file or directory
flet@lappy:~$ echo $?
2
flet@lappy:~$ exitzero ls nonexist
ls: cannot access nonexist: No such file or directory
flet@lappy:~$ echo $?
0

Tests

npm install
npm test

Dependencies

None

Dev Dependencies

  • nixt: Simple and powerful testing for command-line apps
  • tape: tap-producing test harness for node and browsers

License

ISC