handle config with spaces over ssh

This commit is contained in:
Michael Hobbs committed 2014-12-21 14:51:41 -08:00
1 parent c697c65508
commit 67b7fa6263
2 files changed
+10 -5

No files matched your search

+7 -2
View File
@@ -21,8 +21,13 @@ fi
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
export -n SSH_ORIGINAL_COMMAND export -n SSH_ORIGINAL_COMMAND
$0 $SSH_ORIGINAL_COMMAND if [[ $1 =~ config-* ]];then
exit $? xargs $0 <<<$SSH_ORIGINAL_COMMAND
exit $?
else
$0 $SSH_ORIGINAL_COMMAND
exit $?
fi
fi fi
case "$1" in case "$1" in
+3 -3
View File
@@ -11,14 +11,14 @@ teardown() {
} }
@test "config:set" { @test "config:set" {
run dokku config:set $TEST_APP test_var=true test_var2='hello world' run ssh dokku@dokku.me config:set $TEST_APP test_var=true test_var2=\"hello world\"
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
assert_success assert_success
} }
@test "config:get" { @test "config:get" {
run dokku config:set $TEST_APP test_var=true test_var2='hello world' run ssh dokku@dokku.me config:set $TEST_APP test_var=true test_var2=\"hello world\"
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
run dokku config:get $TEST_APP test_var2 run dokku config:get $TEST_APP test_var2
@@ -28,7 +28,7 @@ teardown() {
} }
@test "config:unset" { @test "config:unset" {
run dokku config:set $TEST_APP test_var=true test_var2='hello world' run ssh dokku@dokku.me config:set $TEST_APP test_var=true test_var2=\"hello world\"
echo "output: "$output echo "output: "$output
echo "status: "$status echo "status: "$status
run dokku config:get $TEST_APP test_var run dokku config:get $TEST_APP test_var