From a1e747f4adaee7828142f63b873fd424898ed922 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 26 Aug 2015 00:15:09 -0400 Subject: [PATCH] Guard against missing VHOST files This can occur if the app isn't using vhosts but the user runs the command. --- plugins/domains/commands | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/domains/commands b/plugins/domains/commands index fcd533af6..dba5335ea 100755 --- a/plugins/domains/commands +++ b/plugins/domains/commands @@ -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)