Skip to content

Commit 3c4af88

Browse files
authored
Merge pull request #366 from puppetlabs/bug-fix_dsc_timeout
(Bug): do not pass dsc_timeout as timeout parameter to DSC resource params
2 parents c45001a + 87fc0e2 commit 3c4af88

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ def format_ciminstance(variable_name, class_name, property_hash)
899899
#
900900
# @param resource [Hash] a hash with the information needed to run `Invoke-DscResource`
901901
# @return [String] A string representing the PowerShell definition of the InvokeParams hash
902-
def invoke_params(resource)
902+
def invoke_params(resource) # rubocop:disable Metrics/MethodLength
903903
params = {
904904
Name: resource[:dscmeta_resource_friendly_name],
905905
Method: resource[:dsc_invoke_method],
@@ -917,6 +917,10 @@ def invoke_params(resource)
917917
params[:ModuleName] = resource[:dscmeta_module_name]
918918
end
919919
resource[:parameters].each do |property_name, property_hash|
920+
# ignore dsc_timeout, since it is only used to specify the powershell command timeout
921+
# and timeout itself is not a parameter to the DSC resource
922+
next if property_name == :dsc_timeout
923+
920924
# strip dsc_ from the beginning of the property name declaration
921925
name = property_name.to_s.gsub(/^dsc_/, '').to_sym
922926
params[:Property][name] = case property_hash[:mof_type]

0 commit comments

Comments
 (0)