From a228399fb921eabd635bddd92b63d86ee3c26d2c Mon Sep 17 00:00:00 2001 From: Markus Roberts Date: Sun, 2 May 2010 00:21:37 -0700 Subject: Fix to the fix for #3295 The output variable in the inner block wasn't visible in the outer block, and wasn't needed in any case, since the results are returned naturally if you just leave everything alone. --- lib/puppet/parser/functions/generate.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/puppet/parser/functions') diff --git a/lib/puppet/parser/functions/generate.rb b/lib/puppet/parser/functions/generate.rb index 55161df1a..cf46775ab 100644 --- a/lib/puppet/parser/functions/generate.rb +++ b/lib/puppet/parser/functions/generate.rb @@ -26,12 +26,8 @@ Puppet::Parser::Functions::newfunction(:generate, :type => :rvalue, end begin - Dir.chdir(File.dirname(args[0])) do - output = Puppet::Util.execute(args) - end + Dir.chdir(File.dirname(args[0])) { Puppet::Util.execute(args) } rescue Puppet::ExecutionFailure => detail - raise Puppet::ParseError, "Failed to execute generator %s: %s" % - [args[0], detail] + raise Puppet::ParseError, "Failed to execute generator #{args[0]}: #{detail}" end - output end -- cgit