CLI: Exit status should be 1 when no/wrong arguments are passed
Created by: jmini
Inspired by #124
When the cli is run with wrong or no arguments, it returns the text:
Available languages (generators): [ada, ada-server, android, apache2, apex, aspnetcore, bash, clojure, cwiki, cpp-qt5, cpp-pistache-server, cpp-restbed-server, cpp-restsdk, cpp-tizen, csharp, csharp-dotnet2, csharp-nancyfx, dart, eiffel, elixir, elm, erlang-client, erlang-server, flash, scala-finch, go, go-server, groovy, kotlin, kotlin-server, haskell-http-client, haskell, java, jaxrs-cxf-client, java-inflector, java-msf4j, java-pkmst, java-play-framework, java-undertow-server, java-vertx, jaxrs-cxf, jaxrs-cxf-cdi, jaxrs-jersey, jaxrs-resteasy, jaxrs-resteasy-eap, jaxrs-spec, javascript, javascript-closure-angular, jmeter, lua, nodejs-server, objc, openapi, openapi-yaml, perl, php, php-lumen, php-slim, php-silex, php-symfony, php-ze-ph, powershell, python, python-flask, r, ruby, ruby-on-rails, ruby-sinatra, rust, rust-server, scalatra, scala-akka, scala-httpclient, scala-gatling, scala-lagom-server, scalaz, spring, dynamic-html, html, html2, swift2-deprecated, swift3, swift4, typescript-angular, typescript-angularjs, typescript-aurelia, typescript-fetch, typescript-inversify, typescript-jquery, typescript-node]
Take this bash script:
#!/bin/sh
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar
STATUS="${?}"
echo "Status: ${STATUS}"
The error status should be 1
and not 0