Skip to content

Commit

Permalink
don't fail if docker server is not running (puppetlabs#422) (puppetla…
Browse files Browse the repository at this point in the history
  • Loading branch information
vchepkov authored and davejrt committed Feb 13, 2019
1 parent cd4592d commit 25558b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/facter/docker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def interfaces
Facter.add(:docker_server_version) do
setcode do
docker_version = Facter.value(:docker_version)
if docker_version && docker_version['Server'].is_a?(Hash)
if docker_version && !docker_version['Server'].nil? && docker_version['Server'].is_a?(Hash)
docker_version['Server']['Version']
else
nil
Expand Down

0 comments on commit 25558b6

Please sign in to comment.