Merge pull request #1709 from progrium/1614_mh-wildcard-domains

fix Must specify DOMAIN error over ssh (supercedes #1691)
This commit is contained in:
Michael Hobbs
2015-11-19 14:10:20 -05:00
3 changed files with 14 additions and 1 deletions

2
dokku
View File

@@ -61,7 +61,9 @@ if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
xargs $0 <<<$SSH_ORIGINAL_COMMAND
exit $?
else
set -f
$0 $SSH_ORIGINAL_COMMAND
set +f
exit $?
fi
fi

View File

@@ -65,7 +65,7 @@ case "$1" in
exit 1
fi
if [[ $(egrep ^"$3"$ "$DOKKU_ROOT/$APP/VHOST" > /dev/null 2>&1; echo $?) -eq 0 ]]; then
if [[ $(egrep -w "^{$3}$" "$DOKKU_ROOT/$APP/VHOST" > /dev/null 2>&1; echo $?) -eq 0 ]]; then
echo "$3 is already defined for $APP"
exit 1
fi

View File

@@ -46,6 +46,17 @@ teardown() {
refute_line "test.app.dokku.me"
}
@test "(domains) domains:remove (wildcard domain)" {
run dokku domains:add $TEST_APP *.dokku.me
echo "output: "$output
echo "status: "$status
assert_success
run dokku domains:remove $TEST_APP *.dokku.me
echo "output: "$output
echo "status: "$status
refute_line "*.dokku.me"
}
@test "(domains) domains:clear" {
run dokku domains:add $TEST_APP test.app.dokku.me
echo "output: "$output