[build] Use always set java.home
`System.getenv('JAVA_HOME')` relies on JAVA_HOME being setup by the user. `System.getProperty('java.home')` is set by Java all the time. Closes #14614
This commit is contained in:
parent
40650ad2d5
commit
a7b78bf67a
|
@ -279,7 +279,7 @@ class ClusterFormationTasks {
|
||||||
onlyIf { pidFile.exists() }
|
onlyIf { pidFile.exists() }
|
||||||
// the pid file won't actually be read until execution time, since the read is wrapped within an inner closure of the GString
|
// the pid file won't actually be read until execution time, since the read is wrapped within an inner closure of the GString
|
||||||
ext.pid = "${ -> pidFile.getText('UTF-8').trim()}"
|
ext.pid = "${ -> pidFile.getText('UTF-8').trim()}"
|
||||||
commandLine new File(System.getenv('JAVA_HOME'), 'bin/jps'), '-l'
|
commandLine new File(System.getProperty('java.home'), 'bin/jps'), '-l'
|
||||||
standardOutput = new ByteArrayOutputStream()
|
standardOutput = new ByteArrayOutputStream()
|
||||||
doLast {
|
doLast {
|
||||||
String out = standardOutput.toString()
|
String out = standardOutput.toString()
|
||||||
|
|
Loading…
Reference in New Issue