asyncapi-archived-repos / docgen

AsyncAPI documentation generator. DEPRECATED in favour of
https://github.com/asyncapi/generator
Apache License 2.0
21 stars 11 forks source link

Running from shell always returns zero exit code #20

Closed sfowlr closed 6 years ago

sfowlr commented 6 years ago

When executing adg directly from the shell, the program always returns a zero exit code, even when the documentation generation process fails. Common convention is to return a non-zero exit code when the operation was not successful.

This prevents simple utilization in continuous integration scripts, instead requiring an implementation to call the program from another node script or carefully monitor stdout/stderr to check for success.

To reproduce:

$ npm install -g asyncapi-docgen
$ touch BadFile.yaml
$ adg BadFile.yaml
$ echo $?

This should return anything other than zero on a failed case.

Tested versions: 1.7.1, 1.7.2 Tested OS: MacOS 10.12, Debian 9

fmvilas commented 6 years ago

Good catch! Will take care of this today. Thanks for reporting!

fmvilas commented 6 years ago

@sfowlr Fixed and published to npm. Let me know if you find another problem.