fix: do not rebuild an app that has never been deployed
This commit is contained in:
@@ -6,8 +6,14 @@ source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
ps_rebuild_cmd() {
|
||||
declare desc="rebuilds an app from source"
|
||||
local cmd="ps:rebuild"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
ps_rebuild "$2"
|
||||
local APP="$2"
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
|
||||
if (is_deployed "$APP"); then
|
||||
ps_rebuild "$APP"
|
||||
else
|
||||
dokku_log_warn "App $APP has not been deployed"
|
||||
fi
|
||||
}
|
||||
|
||||
ps_rebuild_cmd "$@"
|
||||
|
||||
Reference in New Issue
Block a user