1
0
mirror of https://github.com/google/nomulus synced 2026-04-20 16:20:50 +00:00

Print JAVA_HOME and PATH in the java format checker task (#997)

* Print JAVA_HOME and PATH in the java format checker task

This allows is to identify if the java version is incompatible with the
formater checker jar file.

* Show which Java binary is used

* show java version

* Fix exeInBash arguments
This commit is contained in:
Lai Jiang
2021-03-10 09:00:08 -05:00
committed by GitHub
parent 24ad8c4557
commit 765a6b9bc3

View File

@@ -401,6 +401,10 @@ def createGetBuildSrcDirectDepsTask(outputFileName) {
rootProject.ext {
invokeJavaDiffFormatScript = { action ->
println("JAVA_HOME=${System.env.JAVA_HOME}")
println("PATH=${System.env.PATH}")
println(ext.execInBash("type java", "${rootDir}"))
println(ext.execInBash("java -version", "${rootDir}"))
def scriptDir = rootDir.path.endsWith('buildSrc')
? "${rootDir}/../java-format"
: "${rootDir}/java-format"