From 89a3aa8097c2e4690c835905dec49df2bc333b30 Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Tue, 17 Mar 2009 23:45:50 +1100 Subject: Fix to stdout in resolution.rb --- lib/facter/util/resolution.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/facter/util/resolution.rb b/lib/facter/util/resolution.rb index 0dfb3b2..04d5e47 100644 --- a/lib/facter/util/resolution.rb +++ b/lib/facter/util/resolution.rb @@ -16,7 +16,7 @@ class Facter::Util::Resolution if Config::CONFIG['host_os'] =~ /mswin/ @have_which = false else - %x{which which 2>/dev/null} + %x{which which >/dev/null 2>&1} @have_which = ($? == 0) end end @@ -33,7 +33,7 @@ class Facter::Util::Resolution if binary !~ /^\// path = %x{which #{binary} 2>/dev/null}.chomp # we don't have the binary necessary - return nil if path == "" + return nil if path == "" or path.match(/Command not found\./) else path = binary end -- cgit