File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
lib/puppet/provider/dsc_base_provider Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -656,8 +656,8 @@ def interpolate_variables(string)
656
656
modified_string
657
657
end
658
658
659
- # Parses a resource definition (as from `invocable_resource`) and, if the resource is implemented
660
- # as a PowerShell class, ensures the System environment variable for PSModulePath is munged to
659
+ # Parses a resource definition (as from `invocable_resource`) and
660
+ # ensures the System environment variable for PSModulePath is munged to
661
661
# include the vendored PowerShell modules. Due to a bug in PSDesiredStateConfiguration, class-based
662
662
# DSC Resources cannot be called via Invoke-DscResource by path, only by module name, *and* the
663
663
# module must be discoverable in the system-level PSModulePath. The postscript for invocation has
@@ -666,8 +666,6 @@ def interpolate_variables(string)
666
666
# @param resource [Hash] a hash with the information needed to run `Invoke-DscResource`
667
667
# @return [String] A multi-line string which sets the PSModulePath at the system level
668
668
def munge_psmodulepath ( resource )
669
- return unless resource [ :dscmeta_resource_implementation ] == 'Class'
670
-
671
669
vendor_path = resource [ :vendored_modules_path ] . tr ( '/' , '\\' )
672
670
<<~MUNGE_PSMODULEPATH . strip
673
671
$UnmungedPSModulePath = [System.Environment]::GetEnvironmentVariable('PSModulePath','machine')
You can’t perform that action at this time.
0 commit comments