Skip to content

Commit

Permalink
Merge pull request #470 from Yelp/getvar_future_parser
Browse files Browse the repository at this point in the history
Also catch :undefined_variable as thrown by future parser
  • Loading branch information
DavidS committed Jun 11, 2015
2 parents 0191a3f + 212c498 commit 8267dbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/puppet/parser/functions/getvar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ module Puppet::Parser::Functions
end

begin
self.lookupvar("#{args[0]}")
catch(:undefined_variable) do
self.lookupvar("#{args[0]}")
end
rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
end

Expand Down

0 comments on commit 8267dbc

Please sign in to comment.