summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2013-10-11 11:43:52 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2013-10-11 11:43:52 -0700
commitad973176bb22acaaa90b221b167d0cf3b3332c81 (patch)
treed91b96898bc82832288861c6c3cf6e0d0e0724a4
parentf3dd943f5f59b2ccb9716e14fcce41dd4ce4d762 (diff)
downloadohai-ad973176bb22acaaa90b221b167d0cf3b3332c81.tar.gz
swap order of redirects
- you need to dup2 before redirecting
-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