aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/config.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/config.rb b/Library/Homebrew/cmd/config.rb
index f5f56d1a6..3f36125f6 100644
--- a/Library/Homebrew/cmd/config.rb
+++ b/Library/Homebrew/cmd/config.rb
@@ -120,7 +120,9 @@ module Homebrew
end
def describe_java
- if which("java").nil? || !quiet_system("/usr/libexec/java_home --failfast")
+ if which("java").nil?
+ "N/A"
+ elsif !(`/usr/libexec/java_home --failfast &>/dev/null` && $?.success?)
"N/A"
else
java = `java -version 2>&1`.lines.first.chomp