Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore :undefined_variable "reason" in getvar #665

Merged
merged 1 commit into from Oct 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/puppet/parser/functions/getvar.rb
Expand Up @@ -21,8 +21,10 @@ module Puppet::Parser::Functions

begin
catch(:undefined_variable) do
self.lookupvar("#{args[0]}")
return self.lookupvar("#{args[0]}")
end

nil # throw was caught
rescue Puppet::ParseError # Eat the exception if strict_variables = true is set
end

Expand Down