Prior to this PR, the vendored dsc module would only be loading into the PSModulePath Env variable if the dsc resource type was implemented as a Class.
Now that DSC Modules seem to be taking the approach of abstracting the DscResource.Base into a seperate module which is then imported, we need to alter the PSModulePath Env variable to include the vendored modules path to ensure this module and its classes (Resource Base) are imported as expected.
Its worth noting that ruby-pwsh will only temporarily add the vendored module path to the PSModulePath Env variable during the puppet agent run, before removing it again in the Dsc resource post invocation script.
Additional Context
Add any additional context about the problem here.
[ ] Root cause and the steps to reproduce. (If applicable)
Summary
Prior to this PR, the vendored dsc module would only be loading into the PSModulePath Env variable if the dsc resource type was implemented as a Class.
Now that DSC Modules seem to be taking the approach of abstracting the DscResource.Base into a seperate module which is then imported, we need to alter the PSModulePath Env variable to include the vendored modules path to ensure this module and its classes (Resource Base) are imported as expected.
Its worth noting that ruby-pwsh will only temporarily add the vendored module path to the PSModulePath Env variable during the puppet agent run, before removing it again in the Dsc resource post invocation script.
Additional Context
Add any additional context about the problem here.
Related Issues (if any)
Fixes https://github.com/puppetlabs/ruby-pwsh/issues/262
Checklist