Merge pull request #1477 from arthurschreiber/patch-2

Support removing config variables that contain `\n`.
This commit is contained in:
Jose Diaz-Gonzalez
2015-09-18 15:53:22 -04:00
2 changed files with 6 additions and 2 deletions

View File

@@ -211,7 +211,7 @@ config_unset() {
for var in $VARS; do
dokku_log_info1 "Unsetting $var"
ENV_TEMP=$(echo -e "${ENV_TEMP}" | sed "/^export $var=/ d")
ENV_TEMP=$(echo "${ENV_TEMP}" | sed "/^export $var=/ d")
config_write "$ENV_TEMP"
done

View File

@@ -77,7 +77,7 @@ teardown() {
}
@test "(config) config:unset" {
run ssh dokku@dokku.me 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\" test_var3=\"with\\nnewline\"
echo "output: "$output
echo "status: "$status
assert_success
@@ -93,6 +93,10 @@ teardown() {
echo "output: "$output
echo "status: "$status
assert_output ""
run dokku config:get $TEST_APP test_var3
echo "output: "$output
echo "status: "$status
assert_output 'with\nnewline'
}
@test "(config) global config (herokuish)" {