Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(MODULES-6860) Add
dsc_lite
feature for confines
- Previously when a version of PowerShell older than 5.0.10586.117 was installed, Puppet would return an error message like: Error: Could not find a suitable provider for dsc Unfortunately this message did not yield any useful information, even with --debug and --verbose turned on, because of the way the existing confine check was performed with a confine :true To produce a more useful message that is meaningful to users, introduce a new feature that performs the same check as the confine, but that also will issue an error message (only once) that indicates the installed version / required version constraints for the module, changing the output to:. Error: The dsc_lite module requires PowerShell version 5.0.10586.117 - current version 5.0.10514.6\n (file & line not available) Error: Could not find a suitable provider for dsc - Note that DSC_LITE_MODULE_POWERSHELL_UPGRADE_MSG is never actually shown when the PowerShell version is < 5.0.10586.117 because the check occurs too late in the lifecycle of loading providers. The confine code has already evaluated, preventing the other messsages from being shown.
- Loading branch information