The main problem here is that any module depending on puppet-sudo has to manually specify the sudoversion fact in its rspec tests because otherwise it will fail.
since versioncmp fails hard when you pass it undef an alternative would be something like:
if (!$::sudoversion or versioncmp($::sudoversion, '1.7.2p1') < 0)
this would still print the warning, but not fail the manifest compilation.
The main problem here is that any module depending on puppet-sudo has to manually specify the sudoversion fact in its rspec tests because otherwise it will fail. since
versioncmp
fails hard when you pass itundef
an alternative would be something like:this would still print the warning, but not fail the manifest compilation.