Skip to content

Commit 330d41f

Browse files
committed
Handle all types
1 parent 2bc679c commit 330d41f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,18 @@ def unwrap_string(value)
10091009
case value
10101010
when Puppet::Pops::Types::PSensitiveType::Sensitive
10111011
value.unwrap
1012+
when Hash
1013+
unwrapped = {}
1014+
value.each do |k, v|
1015+
unwrapped[k] = unwrap_string(v)
1016+
end
1017+
unwrapped
1018+
when Array
1019+
unwrapped = []
1020+
value.each do |v|
1021+
unwrapped << unwrap_string(v)
1022+
end
1023+
unwrapped
10121024
else
10131025
value
10141026
end

0 commit comments

Comments
 (0)