summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-06-12 17:41:02 -0500
committerLuke Kanies <luke@madstop.com>2009-06-12 17:41:02 -0500
commitd2080a5524f993ee746e33364582244cf0e17561 (patch)
tree66867db1a933f705518f81f4b554549771d8675b /lib/puppet
parentaab20201f44271df49d57fbf7c0925f09246b8f0 (diff)
downloadpuppet-d2080a5524f993ee746e33364582244cf0e17561.tar.gz
puppet-d2080a5524f993ee746e33364582244cf0e17561.tar.xz
puppet-d2080a5524f993ee746e33364582244cf0e17561.zip
Fixing #2323 - Modules use environments correctly
Previously, modules were not using their environments when looking up their paths, which meant that they often found files in the wrong environment. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet')
-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 701e4b258..a9f845d6a 100644
--- a/lib/puppet/module.rb
+++ b/lib/puppet/module.rb
@@ -110,7 +110,7 @@ class Puppet::Module
# Find this module in the modulepath.
def path
- self.class.modulepath.collect { |path| File.join(path, name) }.find { |d| FileTest.exist?(d) }
+ environment.modulepath.collect { |path| File.join(path, name) }.find { |d| FileTest.exist?(d) }
end
# Find all plugin directories. This is used by the Plugins fileserving mount.