From 00ebf01227745edc84084d10a9d8be7439551b0f Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Tue, 27 Jul 2010 11:34:32 -0700 Subject: [#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. --- lib/puppet/parser/files.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser/files.rb') 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, -- cgit