Skip to content

Commit

Permalink
Update docker.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianiurca authored Jul 5, 2021
1 parent 6b83e98 commit 8ea5c52
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 @@ -102,7 +102,7 @@ def interfaces
Facter.add(:docker) do
setcode do
docker_version = Facter.value(:docker_client_version)
if docker_version !~ %r{1[.][0-9][0-2]?[.]\w+}
if docker_version.match?(%r{1[.][0-9][0-2]?[.]\w+})
if Facter::Core::Execution.which('docker')
docker_json_str = Facter::Core::Execution.exec(
"#{docker_command} info --format '{{json .}}'", timeout: 90
Expand Down

0 comments on commit 8ea5c52

Please sign in to comment.