这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dokku
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,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
Expand Down
2 changes: 1 addition & 1 deletion plugins/domains/commands
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions tests/unit/domains.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down