summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorPaul Berry <paul@puppetlabs.com>2010-07-27 11:34:32 -0700
committermarkus <markus@AVA-351181.(none)>2010-08-03 15:19:31 -0700
commit00ebf01227745edc84084d10a9d8be7439551b0f (patch)
tree5e334b8f01f4091bd1e25fa2b36731bf4a800bfd /lib/puppet/parser
parente32320ee2c65275e3c695c555f506a499209efa1 (diff)
downloadpuppet-00ebf01227745edc84084d10a9d8be7439551b0f.tar.gz
puppet-00ebf01227745edc84084d10a9d8be7439551b0f.tar.xz
puppet-00ebf01227745edc84084d10a9d8be7439551b0f.zip
[#4344] Fix for failing templates when module name matches file in local dir.
When the name of a module matches the name of a file in the local directory, puppet agent would sometimes try to read that file and interpret it as puppet code. This happened because files.rb was unintentionally permitting puppet files without an extension. Fixed by changing the glob pattern to only permit ".pp" and ".rb" extensions.
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/files.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/files.rb b/lib/puppet/parser/files.rb
index 9ef05e102..f34683153 100644
--- a/lib/puppet/parser/files.rb
+++ b/lib/puppet/parser/files.rb
@@ -24,7 +24,7 @@ module Puppet::Parser::Files
# Than that would be a "no."
end
abspat = File::expand_path(start, cwd)
- [nil, Dir.glob(abspat + (File.extname(abspat).empty? ? '{,.pp,.rb}' : '' )).uniq.reject { |f| FileTest.directory?(f) }]
+ [nil, Dir.glob(abspat + (File.extname(abspat).empty? ? '{.pp,.rb}' : '' )).uniq.reject { |f| FileTest.directory?(f) }]
end
# Find the concrete file denoted by +file+. If +file+ is absolute,