Module Version: 3.1.0
Puppet Version: 6.x
OS Name/Version: Windows
When the ruby-pwsh library is missing or puppetserver is unable to load it, the module throws an error rather than saying the provider is not compatible. The provider does use a feature to handle this, however, there is an extra require that circumvents this behavior.
PR 143 safe loads ruby-pwsh through a confine on the feature. The problem is that the powershell provider has a require_relative to powershell_hash_formatter which has a require 'ruby-pwsh', which is failing. That is why it is not safely failing, but I am not sure why it is failing to load the library since it is present on the system though. It is even odder that it only happens on the first agent runs after starting the service.
The module should try to load the ruby-pwsh library safely
The module loads the library in a way that throws an error.