config: return early if java_home is missing
Fixes mistydemeo/tigerbrew#365.
This commit is contained in:
parent
258a764f67
commit
a662bd4470
@ -148,6 +148,9 @@ module Homebrew
|
||||
end
|
||||
|
||||
def describe_java
|
||||
# java_home doesn't exist on all OS Xs; it might be missing on older versions.
|
||||
return "N/A" unless File.executable? "/usr/libexec/java_home"
|
||||
|
||||
java_xml = Utils.popen_read("/usr/libexec/java_home", "--xml", "--failfast")
|
||||
return "N/A" unless $?.success?
|
||||
javas = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user