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)
656656 modified_string
657657 end
658658
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
661661 # include the vendored PowerShell modules. Due to a bug in PSDesiredStateConfiguration, class-based
662662 # DSC Resources cannot be called via Invoke-DscResource by path, only by module name, *and* the
663663 # module must be discoverable in the system-level PSModulePath. The postscript for invocation has
@@ -666,8 +666,6 @@ def interpolate_variables(string)
666666 # @param resource [Hash] a hash with the information needed to run `Invoke-DscResource`
667667 # @return [String] A multi-line string which sets the PSModulePath at the system level
668668 def munge_psmodulepath ( resource )
669- return unless resource [ :dscmeta_resource_implementation ] == 'Class'
670-
671669 vendor_path = resource [ :vendored_modules_path ] . tr ( '/' , '\\' )
672670 <<~MUNGE_PSMODULEPATH . strip
673671 $UnmungedPSModulePath = [System.Environment]::GetEnvironmentVariable('PSModulePath','machine')
You can’t perform that action at this time.
0 commit comments