aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/system_config.rb
diff options
context:
space:
mode:
authorShaun Jackman2017-09-20 12:03:45 -0700
committerShaun Jackman2017-09-20 13:25:37 -0700
commit2f6b8dcf687d99fed1a9eb64c07472cc7ea2c838 (patch)
treede71a740c94492ca31809dd9d82a5be8cc1dfb46 /Library/Homebrew/system_config.rb
parent8bb57187ab57bc10027e55ea2d4cfd141e896286 (diff)
downloadbrew-2f6b8dcf687d99fed1a9eb64c07472cc7ea2c838.tar.bz2
describe_java: Suppress stderr
Suppress the error message: Unable to find any JVMs matching version "(null)".
Diffstat (limited to 'Library/Homebrew/system_config.rb')
-rw-r--r--Library/Homebrew/system_config.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb
index 5663295c2..3e1acd4ff 100644
--- a/Library/Homebrew/system_config.rb
+++ b/Library/Homebrew/system_config.rb
@@ -134,7 +134,7 @@ class SystemConfig
# java_home doesn't exist on all macOSs; 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")
+ java_xml = Utils.popen_read("/usr/libexec/java_home", "--xml", "--failfast", err: :close)
return "N/A" unless $CHILD_STATUS.success?
javas = []
REXML::XPath.each(REXML::Document.new(java_xml), "//key[text()='JVMVersion']/following-sibling::string") do |item|