From 99d8323ece06ffde0ddfb5753ef94541d473a9d9 Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Sat, 10 Jul 2010 18:52:28 +0200 Subject: Fix #4206 - import "path/*" tries to import files twice Due to the glob pattern used, we are trying to import manifests twice. Since it isn't possible (see #4205), it is not possible to use a pattern in an import statement. This patch makes sure manifests are returned only once. Signed-off-by: Brice Figureau --- lib/puppet/parser/files.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/parser/files.rb b/lib/puppet/parser/files.rb index 749743493..9ef05e102 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}' : '' )).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