Merge pull request #815 from ekingme/patch-1

Confine nginx_version fact
This commit is contained in:
Matthew Haughton 2016-06-23 14:16:12 -04:00 committed by GitHub
commit 9f085500b2

View file

@ -1,6 +1,6 @@
Facter.add(:nginx_version) do
setcode do
if Facter::Util::Resolution.which('nginx')
if Facter.value('kernel') != 'windows' && Facter::Util::Resolution.which('nginx')
nginx_version = Facter::Util::Resolution.exec('nginx -v 2>&1')
%r{^nginx version: nginx\/([\w\.]+)}.match(nginx_version)[1]
end