2.2.1 and newer
Currently, the unless clause here shells out to facter -p to get the agent version. https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/8e6bdc474045119a2c47c6666aa349402835bf89/manifests/install/windows.pp#L107-L123
This check was added as part of
MODULES-9846 in order to prevent cached catalogs from re-installing the .msi.
However, facter -p <fact> resolves all facts, not just <fact>. This introduces the possibility of other, possibly custom, facts causing issues ranging from runtimes that exceed the 5 minute timeout that exec resources have in Puppet 6 to extra logging output produced by facter causing the check to register a false positive.
Timeouts are especially dangerous as they can leave orphaned facter.exe processes that eventually exhaust system resources.
puppet-agent does not shell out to facter on Windows
puppet-agent does shell out to facter on Windows