Skip to content

Commit 8267dbc

Browse files
committed
Merge pull request #470 from Yelp/getvar_future_parser
Also catch :undefined_variable as thrown by future parser
2 parents 0191a3f + 212c498 commit 8267dbc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/puppet/parser/functions/getvar.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ module Puppet::Parser::Functions
2020
end
2121

2222
begin
23-
self.lookupvar("#{args[0]}")
23+
catch(:undefined_variable) do
24+
self.lookupvar("#{args[0]}")
25+
end
2426
rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
2527
end
2628

0 commit comments

Comments
 (0)