diff --git a/plugins/git/commands b/plugins/git/commands index 174ba12abf9..64fd5e12e4a 100755 --- a/plugins/git/commands +++ b/plugins/git/commands @@ -37,7 +37,7 @@ case "$1" in # if block if you wish to run it for others as well. if [[ $refname = "refs/heads/master" ]] ; then # broken out into pluginhook so we might support other methods to receive an app - pluginhook receive-app $APP $newrev + pluginhook -p receive-app $APP $newrev else if test -f "$PLUGIN_PATH"/enabled/*/receive-branch; then pluginhook receive-branch $APP $newrev $refname diff --git a/plugins/git/receive-app b/plugins/git/receive-app index 847df876c63..328fbeb1d94 100755 --- a/plugins/git/receive-app +++ b/plugins/git/receive-app @@ -4,4 +4,9 @@ source "$(dirname $0)/../common/functions" APP="$1"; REV="$2" -dokku git-build $APP $REV +# Don't trigger git build if there is no git repository. +if [ ! -d "$DOKKU_ROOT/$APP/refs" ]; then + cat +else + dokku git-build $APP $REV +fi diff --git a/plugins/ps/commands b/plugins/ps/commands index bc6d2ab5224..9e8a2383006 100755 --- a/plugins/ps/commands +++ b/plugins/ps/commands @@ -49,7 +49,7 @@ case "$1" in verify_app_name "$2" APP="$2" - pluginhook receive-app $APP + pluginhook -p receive-app $APP ;; ps:rebuildall)