Skip to content

Commit 24ac2d0

Browse files
committed
fix: ensure global_context is available in Deferred resolution of Puppet-lang functions
1 parent 1ea698f commit 24ac2d0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/puppet/pops/evaluator/deferred_resolver.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ def self.resolve_and_replace(facts, catalog, environment = catalog.environment_i
4848
# # Server facts are always about the local node's version etc.
4949
# @scope.set_server_facts(node.server_facts)
5050

51-
resolver.resolve_futures(catalog)
51+
# Must be wrapped in with_context_overrides to ensure global_scope is valid for Puppet-language functions
52+
compiler.with_context_overrides do
53+
resolver.resolve_futures(catalog)
54+
end
5255
nil
5356
end
5457

0 commit comments

Comments
 (0)