JavaRequirement: return false if no java_home
Closes #118. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This commit is contained in:
parent
da643d942e
commit
c20622ade4
@ -6,6 +6,8 @@ class JavaRequirement < Requirement
|
||||
download "http://www.oracle.com/technetwork/java/javase/downloads/index.html"
|
||||
|
||||
satisfy :build_env => false do
|
||||
return false unless File.executable? "/usr/libexec/java_home"
|
||||
|
||||
args = %w[--failfast]
|
||||
args << "--version" << "#{@version}" if @version
|
||||
@java_home = Utils.popen_read("/usr/libexec/java_home", *args).chomp
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user