The facter install.rb script did not consistently check for the windows
platform. As a result, the facter batch wrapper scripts were not being
installed.

Reviewed-by: Jacob Helwig <[email protected]>
Signed-off-by: Josh Cooper <[email protected]>
---
Local-branch: feature/master/facter-windows
 install.rb |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/install.rb b/install.rb
index d4793eb..ccfcb87 100755
--- a/install.rb
+++ b/install.rb
@@ -58,6 +58,10 @@ rescue
     $haveman = false
 end
 
+$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
+require 'facter'
+@operatingsystem = Facter[:operatingsystem].value
+
 PREREQS = %w{openssl xmlrpc/client xmlrpc/server cgi}
 
 InstallOptions = OpenStruct.new
@@ -126,7 +130,7 @@ def check_prereqs
 end
 
 def is_windows?
-  RUBY_PLATFORM.to_s.match(/mswin|win32|dos|cygwin|mingw/)
+  @operatingsystem == 'windows'
 end
 
 ##
@@ -387,7 +391,7 @@ def install_binfile(from, op_file, target)
         end
     end
 
-    if Config::CONFIG["target_os"] =~ /win/io and Config::CONFIG["target_os"] 
!~ /darwin/io
+    if is_windows?
         installed_wrapper = false
 
         if File.exists?("#{from}.bat")
-- 
1.7.5.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to