From a785bf82e6a86c07a70df12b0b9702888d417df5 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Mon, 18 May 2015 09:00:57 -0700 Subject: [PATCH] handle docker opts over ssh without escaping quotes. closes #1187 --- plugins/docker-options/commands | 6 ++++-- tests/unit/docker-options.bats | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/docker-options/commands b/plugins/docker-options/commands index 46bc8a8c0..f6bdbdd4f 100755 --- a/plugins/docker-options/commands +++ b/plugins/docker-options/commands @@ -81,7 +81,8 @@ get_passed_docker_option() { add_passed_docker_option() { local passed_phases=("${!1}") - local passed_option_string=$2 + shift + local passed_option_string="$@" local phase for phase in "${passed_phases[@]}"; do get_phase_file_path $phase @@ -94,7 +95,8 @@ add_passed_docker_option() { remove_passed_docker_option() { local passed_phases=("${!1}") - local passed_option_string=$2 + shift + local passed_option_string="$@" local phase for phase in "${passed_phases[@]}"; do get_phase_file_path $phase diff --git a/tests/unit/docker-options.bats b/tests/unit/docker-options.bats index d10f346e7..3b772c34d 100644 --- a/tests/unit/docker-options.bats +++ b/tests/unit/docker-options.bats @@ -151,7 +151,7 @@ teardown() { } @test "docker-options:add (all phases over SSH)" { - run ssh dokku@dokku.me docker-options:add $TEST_APP build,deploy,run \"-v /tmp\" + run ssh dokku@dokku.me docker-options:add $TEST_APP build,deploy,run "-v /tmp" echo "output: "$output echo "status: "$status assert_success