summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-03-17 23:45:50 +1100
committerJames Turnbull <james@lovedthanlost.net>2009-03-17 23:45:50 +1100
commit89a3aa8097c2e4690c835905dec49df2bc333b30 (patch)
tree1b571db34577d374d0eb1abb7b93c8d4cc8fc8e3
parentadd6d4763b82ff45c7582f15fab84867ac2ef1a3 (diff)
downloadfacter-89a3aa8097c2e4690c835905dec49df2bc333b30.tar.gz
facter-89a3aa8097c2e4690c835905dec49df2bc333b30.tar.xz
facter-89a3aa8097c2e4690c835905dec49df2bc333b30.zip
Fix to stdout in resolution.rb
-rw-r--r--lib/facter/util/resolution.rb4
1 files 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