summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/facter/util/resolution.rb9
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