summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLuke Kanies <luke@puppetlabs.com>2011-03-25 12:39:13 -0700
committerLuke Kanies <luke@puppetlabs.com>2011-03-25 14:32:03 -0700
commit29268f3fda3c6e29f60d05e5aa387ff0424e7b1e (patch)
tree618a97d95f843f59091f33645b976d7e1417c8c6 /lib
parentda082d500e1f1192dbc987483d753d93b5698094 (diff)
downloadpuppet-29268f3fda3c6e29f60d05e5aa387ff0424e7b1e.tar.gz
puppet-29268f3fda3c6e29f60d05e5aa387ff0424e7b1e.tar.xz
puppet-29268f3fda3c6e29f60d05e5aa387ff0424e7b1e.zip
Fixing Module#path detection
For some reason FileTest.exist? was returning false, and FileTest.directory? returns true. I've also added much better tests for this behavior. Signed-off-by: Luke Kanies <luke@puppetlabs.com> Reviewed-by: Daniel Pittman <daniel@puppetlabs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/module.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb
index 43266b2b5..059591ed8 100644
--- a/lib/puppet/module.rb
+++ b/lib/puppet/module.rb
@@ -138,7 +138,7 @@ class Puppet::Module
# Find this module in the modulepath.
def path
- environment.modulepath.collect { |path| File.join(path, name) }.find { |d| FileTest.exist?(d) }
+ environment.modulepath.collect { |path| File.join(path, name) }.find { |d| FileTest.directory?(d) }
end
# Find all plugin directories. This is used by the Plugins fileserving mount.