Skip to content

Commit 0506dde

Browse files
committed
Allow deferrable_epp to return a Sensitive[String]
If none of the input variables are `Deferred`, then `deferrable_epp` returns the result of calling normal `epp`. The `epp` function however will return a `Sensitive` if any of the variables it was called with were `Sensitive`. See puppetlabs/puppet#8330 Adding `Sensitive[String]` to the list of allowed return types fixes this.
1 parent 78e07be commit 0506dde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/deferrable_epp.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# use facts, class variables, and other variables in scope. This is because when deferred, we
66
# have to explicitly pass the entire scope to the client.
77
#
8-
function stdlib::deferrable_epp(String $template, Hash $variables) >> Variant[String, Deferred] {
8+
function stdlib::deferrable_epp(String $template, Hash $variables) >> Variant[String, Sensitive[String], Deferred] {
99
if $variables.any |$key, $value| { $value.is_a(Deferred) } {
1010
Deferred(
1111
'inline_epp',

0 commit comments

Comments
 (0)