diff options
author | Luke Kanies <luke@madstop.com> | 2008-07-31 10:54:47 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-07-31 10:54:47 -0500 |
commit | d7c72309451d19f5a0a33c2b96e721783091470f (patch) | |
tree | 08eba5e42e4129a1c6884ad03e0590e415eb8d8f | |
parent | d57d9b5fa05c73774d111323ac0bdca6116b76be (diff) | |
parent | 1eb94d31cc9fa1c2ae36e1000fe91515d95cb935 (diff) | |
download | facter-d7c72309451d19f5a0a33c2b96e721783091470f.tar.gz facter-d7c72309451d19f5a0a33c2b96e721783091470f.tar.xz facter-d7c72309451d19f5a0a33c2b96e721783091470f.zip |
Merge commit 'pnasrat/ticket/1434'
-rw-r--r-- | lib/facter/util/resolution.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/facter/util/resolution.rb b/lib/facter/util/resolution.rb index cc8c842..4d0a8d1 100644 --- a/lib/facter/util/resolution.rb +++ b/lib/facter/util/resolution.rb @@ -6,14 +6,19 @@ require 'facter/util/confine' require 'timeout' +require 'rbconfig' class Facter::Util::Resolution attr_accessor :interpreter, :code, :name, :timeout def self.have_which if ! defined?(@have_which) or @have_which.nil? - %x{which which 2>/dev/null} - @have_which = ($? == 0) + if Config::CONFIG['host_os'] =~ /mswin/ + @have_which = false + else + %x{which which 2>/dev/null} + @have_which = ($? == 0) + end end @have_which end |