Skip to content

Commit

Permalink
Merge pull request #671 from CAPSLOCK2000/fix-array-of-additional-flags
Browse files Browse the repository at this point in the history
Fix array of additional flags
  • Loading branch information
adrianiurca authored Oct 21, 2020
2 parents 8a2a029 + 4f20f06 commit ec3159f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/puppet/provider/docker_network/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,19 @@ def network_conf
new_flags = multi_flags.call(values, format)
flags.concat(new_flags)
end
if resource[:additional_flags].is_a?(String)
additional_flags = resource[:additional_flags].split

if defined?(resource[:additional_flags])
additional_flags = []
if resource[:additional_flags].is_a?(String)
additional_flags = resource[:additional_flags].split
elsif resource[:additional_flags].is_a?(Array)
additional_flags = resource[:additional_flags]
end
additional_flags.each do |additional_flag|
flags << additional_flag
end
end

flags << resource[:name]
end

Expand Down

0 comments on commit ec3159f

Please sign in to comment.