Guard against missing VHOST files

This can occur if the app isn't using vhosts but the user runs the command.
This commit is contained in:
Jose Diaz-Gonzalez
2015-08-26 00:15:09 -04:00
parent 09ee1def8f
commit a1e747f4ad

View File

@@ -29,8 +29,12 @@ case "$1" in
APP="$2"
dokku domains:setup $APP
dokku_log_info2_quiet "$APP Domain Names"
cat "$DOKKU_ROOT/$APP/VHOST"
if [[ -f "$DOKKU_ROOT/$APP/VHOST" ]]; then
dokku_log_info2_quiet "$APP Domain Names"
cat "$DOKKU_ROOT/$APP/VHOST"
else
dokku_log_fail "No domain names set for $APP"
fi
;;
domains:setup)