summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-05-02 00:21:37 -0700
committerMarkus Roberts <Markus@reality.com>2010-05-02 00:21:37 -0700
commitebd924c22c1049cde5f110c6ec89de4d9358b649 (patch)
treee50598812b0f95b5df848c854ec60f3914147d91 /lib/puppet/parser
parentce233aa2a511bf6818f28c226144ec5b05a468ee (diff)
downloadpuppet-ebd924c22c1049cde5f110c6ec89de4d9358b649.tar.gz
puppet-ebd924c22c1049cde5f110c6ec89de4d9358b649.tar.xz
puppet-ebd924c22c1049cde5f110c6ec89de4d9358b649.zip
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.
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r--lib/puppet/parser/functions/generate.rb8
1 files changed, 2 insertions, 6 deletions
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