Closed cbautista1002 closed 5 years ago
Definitely think this would be helpful.
In my scripts I've added the following in order to exit with a failure code (very rough and dirty):
[[ $( ${SWAGGER_COMBINE_CMD} ./swagger-sources.json -o ../swagger-combined.json) != "" ]] && exit 1
Thanks for taking care of this @tmack8001. Greatly appreciated
Currently if swagger-combine fails to process a file, eg: source swagger files have a syntax error or
apis
listing is invalid, swagger-combine exits with a0
exit code. Ideally a non-zero exit code should be returned. This would help with automation scripts where we don't want the script to continue processing if swagger-combine wasn't able to process the files.For now, I'm going to have to check the output of the call to swagger-combine to see if it returned some error text which is not ideal.
Thoughts? Thanks!