diff --git a/lib/dip/commands/run.rb b/lib/dip/commands/run.rb index b1ac843..5575e85 100644 --- a/lib/dip/commands/run.rb +++ b/lib/dip/commands/run.rb @@ -78,7 +78,11 @@ def published_ports def get_args if argv.any? - argv + if command[:shell] + [argv.shelljoin] + else + Array(default_args) + end elsif !(default_args = command[:default_args]).empty? if command[:shell] default_args.shellsplit diff --git a/spec/lib/dip/commands/run_spec.rb b/spec/lib/dip/commands/run_spec.rb index 5ba2c41..b67ec1d 100644 --- a/spec/lib/dip/commands/run_spec.rb +++ b/spec/lib/dip/commands/run_spec.rb @@ -45,7 +45,7 @@ context "when publish is part of a command" do before { cli.start "run rails s --publish=3000:3000".shellsplit } - it { expected_exec("docker-compose", ["run", "--rm", "app", "rails", "s", "--publish=3000:3000"]) } + it { expected_exec("docker-compose", ["run", "--rm", "app", "rails", "s", "--publish\\=3000:3000"]) } end context "when run psql command without db name" do