mirror of
https://github.com/google/nomulus.git
synced 2025-04-29 19:47:51 +02:00
* Allow java-format to use java from the PATH When invoking java from the google-java-format-git-diff.sh script, if there is no JAVA_HOME environment variable, attempt to instead run the java binary that is on the PATH. This also adds a few checks to verify that a java binary is available in one of those locations and that the version discovered is Java 11 (which we know to be compatible with the google-java-format jar). Tested: - unset JAVA_HOME, verified that we get the version on the PATH - Set JAVA_HOME to an invalid directory, verified that we get an error. - Changed the "which" command to lookup an nonexistent binary, unset JAVA_HOME and verified that we get a "java not found" error. - Changed the path to point to an old version of java, verified that we get a "bad java version" error. - Verified that the script still runs normally. |
||
---|---|---|
.. | ||
google-java-format-1.8-all-deps.jar | ||
google-java-format-diff.py | ||
google-java-format-git-diff.sh |