makepkg: return E_PKGBUILD_ERROR for nonexistent PKGBUILD

This is not really an error with a "user function".

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Eli Schwartz 2019-01-10 00:58:44 -05:00 committed by Allan McRae
parent 5d2f7ee6c3
commit ce040514c4

View file

@ -1222,7 +1222,7 @@ unset "${!sha384sums_@}" "${!sha512sums_@}"
BUILDFILE=${BUILDFILE:-$BUILDSCRIPT} BUILDFILE=${BUILDFILE:-$BUILDSCRIPT}
if [[ ! -f $BUILDFILE ]]; then if [[ ! -f $BUILDFILE ]]; then
error "$(gettext "%s does not exist.")" "$BUILDFILE" error "$(gettext "%s does not exist.")" "$BUILDFILE"
exit $E_USER_FUNCTION_FAILED exit $E_PKGBUILD_ERROR
else else
if [[ $(<"$BUILDFILE") = *$'\r'* ]]; then if [[ $(<"$BUILDFILE") = *$'\r'* ]]; then