Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker_compose up_args #997

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/puppet/provider/docker_compose/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_image(service_name, compose_services)

def create
Puppet.info("Running compose project #{name}")
args = ['compose', compose_files, '-p', name, 'up', '-d', '--remove-orphans'].insert(3, resource[:options]).insert(5, resource[:up_args]).compact
args = ['compose', compose_files, '-p', name, resource[:options], 'up', resource[:up_args], '-d', '--remove-orphans'].flatten.compact
docker(args)
return unless resource[:scale]

Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/docker_compose.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def refresh
newparam(:up_args) do
desc 'Arguments to be passed directly to docker-compose up.'
validate do |value|
raise _('up_args should be a String') unless value.is_a? String
raise _('up_args should be a String') unless value.is_a? Array
end
end

Expand Down
Loading