summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlamont-granquist <lamont@scriptkiddie.org>2014-01-08 16:25:34 -0800
committerlamont-granquist <lamont@scriptkiddie.org>2014-01-08 16:25:34 -0800
commit798daefb3104cf9911e397ad9a1b200dc8c00fdc (patch)
tree92118c54bb43d7cdbbfc0f3275cfd7325f02ace1
parentf6ee8d5bc79b9cab15d618158a0c301a54d3f5c2 (diff)
parentad973176bb22acaaa90b221b167d0cf3b3332c81 (diff)
downloadohai-798daefb3104cf9911e397ad9a1b200dc8c00fdc.tar.gz
Merge pull request #212 from opscode/lcg/java-stdout-bug
swap order of redirects
-rw-r--r--lib/ohai/plugins/java.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ohai/plugins/java.rb b/lib/ohai/plugins/java.rb
index 67310bfd..d5bbd7e2 100644
--- a/lib/ohai/plugins/java.rb
+++ b/lib/ohai/plugins/java.rb
@@ -6,9 +6,9 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,8 +22,8 @@ require_plugin "languages"
java = Mash.new
status, stdout, stderr = nil
-if RUBY_PLATFORM.downcase.include?("darwin")
- if system("/usr/libexec/java_home 2>&1 >/dev/null")
+if RUBY_PLATFORM.downcase.include?("darwin")
+ if system("/usr/libexec/java_home >/dev/null 2>&1")
status, stdout, stderr = run_command(:no_status_check => true, :command => "java -version")
end
else