From ebcb6b6df7af42632a6c1beaa1b60171ff32b61e Mon Sep 17 00:00:00 2001 From: lutter Date: Fri, 9 Mar 2007 00:48:28 +0000 Subject: The template function now tries to first find a template within a module (if the template path looks like it belongs to a module) and only when that fails looks for it in templatedir git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2277 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/parser/templatewrapper.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/puppet/parser') diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb index 62b45852b..3b8cc3a3a 100644 --- a/lib/puppet/parser/templatewrapper.rb +++ b/lib/puppet/parser/templatewrapper.rb @@ -7,11 +7,7 @@ class Puppet::Parser::TemplateWrapper def initialize(scope, file) @scope = scope - if file =~ /^#{File::SEPARATOR}/ - @file = file - else - @file = File.join(Puppet[:templatedir], file) - end + @file = Puppet::Module::find_template(file) unless FileTest.exists?(@file) raise Puppet::ParseError, -- cgit