fix: do not rebuild an app that has never been deployed
This commit is contained in:
1 parent
8eb4246040
commit
77c63b8d98
1 file changed
+8
-2
@@ -6,8 +6,14 @@ source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
|||||||
ps_rebuild_cmd() {
|
ps_rebuild_cmd() {
|
||||||
declare desc="rebuilds an app from source"
|
declare desc="rebuilds an app from source"
|
||||||
local cmd="ps:rebuild"
|
local cmd="ps:rebuild"
|
||||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
local APP="$2"
|
||||||
ps_rebuild "$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 "$@"
|
ps_rebuild_cmd "$@"
|
||||||
Reference in new issue
Block a user