summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan del Strother <jdelStrother@gmail.com>2012-06-07 00:20:39 +0200
committerBryan McLellan <btm@opscode.com>2012-08-03 12:30:21 -0700
commitacac0521b1bba59ade21c73c86969d482c801faa (patch)
treed45ce0096bb1a98f96fa10fae17905be97a88dfa
parentda8397940162dc1ef10b189ac561a26a101f6580 (diff)
downloadohai-acac0521b1bba59ade21c73c86969d482c801faa.tar.gz
Fix stderr redirection in Java plugin
It was piping to a file called '1', rather than redirecting to stdout.
-rw-r--r--lib/ohai/plugins/java.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/java.rb b/lib/ohai/plugins/java.rb
index b271f3e0..67310bfd 100644
--- a/lib/ohai/plugins/java.rb
+++ b/lib/ohai/plugins/java.rb
@@ -23,7 +23,7 @@ java = Mash.new
status, stdout, stderr = nil
if RUBY_PLATFORM.downcase.include?("darwin")
- if system("/usr/libexec/java_home 2&>1 >/dev/null")
+ if system("/usr/libexec/java_home 2>&1 >/dev/null")
status, stdout, stderr = run_command(:no_status_check => true, :command => "java -version")
end
else