From b6c6df1f61842381b6a7da17064b8e09aaf0da67 Mon Sep 17 00:00:00 2001 From: Greg Koch Date: Wed, 8 Jun 2016 14:33:02 -0400 Subject: [PATCH] update nginx_version fact to check for kernel not equal windows --- lib/facter/nginx_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/facter/nginx_version.rb b/lib/facter/nginx_version.rb index f4c1372..06b3780 100644 --- a/lib/facter/nginx_version.rb +++ b/lib/facter/nginx_version.rb @@ -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