From 043a1a01c51f8bd2f1a85f783fab0d19785c09e3 Mon Sep 17 00:00:00 2001 From: Ludovic Perrine Date: Thu, 2 Oct 2014 15:40:21 +0200 Subject: [PATCH] Fixed setting config values with spaces over SSH --- dokku | 6 ++++++ tests/apps/config/post-deploy | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dokku b/dokku index 46dedd131..43ab697b3 100755 --- a/dokku +++ b/dokku @@ -12,6 +12,12 @@ if [[ $(id -un) != "dokku" && $1 != plugins-install* ]]; then exit fi +if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then + export -n SSH_ORIGINAL_COMMAND + $0 $SSH_ORIGINAL_COMMAND + exit $? +fi + case "$1" in receive) APP="$2"; IMAGE="dokku/$APP" diff --git a/tests/apps/config/post-deploy b/tests/apps/config/post-deploy index eed12fabf..440051a2c 100755 --- a/tests/apps/config/post-deploy +++ b/tests/apps/config/post-deploy @@ -4,5 +4,5 @@ set -ex; REMOTE=$1 REPO=$2 -ssh $REMOTE config:set $REPO CONFTEST=config-test HELLO="Hello world" +ssh $REMOTE config:set $REPO CONFTEST=config-test HELLO=\"Hello world\"