Fix bug when VHOST without newline

This commit is contained in:
Kazuhiro NISHIYAMA
2016-11-14 22:21:41 +09:00
parent d7c8e47e78
commit ccc44b0c16
2 changed files with 2 additions and 2 deletions

View File

@@ -148,7 +148,7 @@ domains_add_global() {
if [[ $(egrep -w "^$DOMAIN$" "$GLOBAL_VHOST_PATH" > /dev/null 2>&1; echo $?) -eq 0 ]]; then
dokku_log_info1 "Skipping: $DOMAIN already added"
else
echo "$DOMAIN" >> "$GLOBAL_VHOST_PATH"
sed -i -e "\$a\\$DOMAIN" "$GLOBAL_VHOST_PATH"
dokku_log_info1 "Added $DOMAIN"
fi
done

View File

@@ -170,7 +170,7 @@ teardown() {
echo "status: "$status
assert_success
run bash -c "dokku domains | grep -q global.dokku.me"
run bash -c "dokku domains | egrep -qw '^global.dokku.me\$'"
echo "output: "$output
echo "status: "$status
assert_success