diff --git a/precommit/src/main/shell/core.d/patchfiles.sh b/precommit/src/main/shell/core.d/patchfiles.sh index 1af59663d..67dec857a 100755 --- a/precommit/src/main/shell/core.d/patchfiles.sh +++ b/precommit/src/main/shell/core.d/patchfiles.sh @@ -155,8 +155,14 @@ function locate_patch "${PATCH_OR_ISSUE}" \ "${INPUT_PATCH_FILE}" \ "${INPUT_DIFF_FILE}"; then - gotit=true - PATCH_SYSTEM=${bugsys} + if [[ -f "${INPUT_PATCH_FILE}" || -f "${INPUT_DIFF_FILE}" ]]; then + gotit=true + PATCH_SYSTEM=${bugsys} + else + # this situation can happen if the bugsystem forced a full build + # so not an error. + yetus_debug "Bugsystem ${bugsys} did not actually download a change." + fi fi fi # did the bug system actually make us change our mind? @@ -168,7 +174,7 @@ function locate_patch # ok, none of the bug systems know. let's see how smart we are if [[ ${gotit} == false ]]; then if ! generic_locate_patch "${PATCH_OR_ISSUE}" "${INPUT_PATCH_FILE}"; then - yetus_error "ERROR: Unsure how to process ${PATCH_OR_ISSUE}." + yetus_error "ERROR: Unsure how to process ${PATCH_OR_ISSUE}. Permissions missing?" cleanup_and_exit 1 fi PATCH_SYSTEM=generic diff --git a/precommit/src/main/shell/plugins.d/github.sh b/precommit/src/main/shell/plugins.d/github.sh index b49c404f3..71b0c3c9d 100755 --- a/precommit/src/main/shell/plugins.d/github.sh +++ b/precommit/src/main/shell/plugins.d/github.sh @@ -522,9 +522,11 @@ function github_locate_patch case "${input}" in GHSHA:*) github_locate_sha_patch "${input}" "${patchout}" "${diffout}" + return $? ;; *) github_locate_pr_patch "${input}" "${patchout}" "${diffout}" + return $? ;; esac } diff --git a/precommit/src/main/shell/plugins.d/gitlab.sh b/precommit/src/main/shell/plugins.d/gitlab.sh index d647751cb..8c4b0a52d 100755 --- a/precommit/src/main/shell/plugins.d/gitlab.sh +++ b/precommit/src/main/shell/plugins.d/gitlab.sh @@ -346,9 +346,11 @@ function gitlab_locate_patch case "${input}" in GLSHA:*) gitlab_locate_sha_patch "${input}" "${patchout}" "${diffout}" + return $? ;; *) gitlab_locate_mr_patch "${input}" "${patchout}" "${diffout}" + return $? ;; esac }