Skip to content

Commit

Permalink
Work around usage of 'which' in Ubuntu 12.04 (https://tickets.puppetl…
Browse files Browse the repository at this point in the history
  • Loading branch information
eumel8 authored and eputnam committed Nov 18, 2016
1 parent 6ee8180 commit d900464
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/facter/haproxy_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#
# Notes:
# None
if Facter::Util::Resolution.which('haproxy')
# workaround Ubuntu 12.04: https://tickets.puppetlabs.com/browse/MODULES-2881
if defined?(Facter::Util::Resolution.which) and Facter::Util::Resolution.which('haproxy')
Facter.add('haproxy_version') do
haproxy_version_cmd = 'haproxy -v 2>&1'
haproxy_version_result = Facter::Util::Resolution.exec(haproxy_version_cmd)
Expand Down

0 comments on commit d900464

Please sign in to comment.