(CAT-1617) - Always load vendored module in PSModulePath #261
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #262
Checklist