fod-dev / fod-uploader-java

Java Utility for uploading packages to FoD
MIT License
12 stars 27 forks source link

Update exit code return values of help and version #99

Closed matthew-dawson closed 2 years ago

matthew-dawson commented 2 years ago

At present, invoking the FodUpload.jar via the command line and passing options for version or help (i.e. java -jar FodUpload.jar -v) results in an exit status of 1, rather than the expected successful exit status of 0.

Per the Java API documentation (https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/System.html#exit(int)), "by convention, a nonzero status code indicates abnormal termination."

Updating the exit code returned to 0 (successful) when passing the help and version options, such that automated build tools can output installed versions without throwing an unsuccessful error code.