summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNuo Yan <nuo@opscode.com>2010-05-03 15:41:47 -0700
committerNuo Yan <nuo@opscode.com>2010-05-03 15:41:47 -0700
commitab2be1e592af441eb843bae1917be13019dd0a90 (patch)
tree7674a733e433ca6242a69b0d5aa46b9a83541891 /bin
parent97e207191826912ba9183d9f757aaf3aa0cceac8 (diff)
downloadohai-ab2be1e592af441eb843bae1917be13019dd0a90.tar.gz
add mingw32 and windows to the platform matching so it knows to use the windows plugin
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ohai10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/ohai b/bin/ohai
index c1a434e0..4686be36 100755
--- a/bin/ohai
+++ b/bin/ohai
@@ -37,4 +37,14 @@ rescue LoadError
raise
end
+
+if RUBY_PLATFORM =~ /mswin|mingw32|windows/
+ begin
+ require 'ruby-wmi'
+ rescue LoadError
+ STDERR.puts "ruby-wmi failed to load - is it installed?"
+ raise
+ end
+end
+
Ohai::Application.new.run