summaryrefslogtreecommitdiffstats
path: root/lib/puppet/provider
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-11-04 13:53:23 -0700
committerJames Turnbull <james@lovedthanlost.net>2010-11-12 15:02:00 +1100
commitb15231df5842df2ea83b779b22e6756e51bc39d0 (patch)
tree34978db4a199ccca92e35c66e154851bc60fff27 /lib/puppet/provider
parentea435a43dc97487d054271a9efb208f361408339 (diff)
Fix for #4299 -- Don't require which
We already had an internal implementation of which hiding under an assumed name (Puppet::Util.binary); this commit calls it out of hiding and uses it consisantly.
Diffstat (limited to 'lib/puppet/provider')
-rw-r--r--lib/puppet/provider/confine/exists.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/puppet/provider/confine/exists.rb b/lib/puppet/provider/confine/exists.rb
index 085118b2a..09f94dfd9 100644
--- a/lib/puppet/provider/confine/exists.rb
+++ b/lib/puppet/provider/confine/exists.rb
@@ -6,10 +6,7 @@ class Puppet::Provider::Confine::Exists < Puppet::Provider::Confine
end
def pass?(value)
- if for_binary?
- return false unless value = binary(value)
- end
- value and FileTest.exist?(value)
+ value && (for_binary? ? which(value) : FileTest.exist?(value))
end
def message(value)