rpm/build: fix failure if gpg key not configured on git

Fixes: 64f8ec6099 ('rpm/build*.sh: trap failures')
This commit is contained in:
Íñigo Huguet 2025-02-28 13:39:23 +01:00
parent c6093e1dab
commit 1487484be7

View file

@ -237,7 +237,7 @@ rpmbuild --define "_topdir $TEMP" $RPM_BUILD_OPTION "$TEMPSPEC" $NM_RPMBUILD_ARG
LS_EXTRA=()
if [ "$SIGN_SOURCE" = 1 ]; then
SIGNKEY="$(git config --get user.signingkey)"
SIGNKEY="$(git config --get user.signingkey || :)"
if [ "$SIGNKEY" != "" ]; then
SIGNKEY="--local-user $(printf '%q' "$SIGNKEY")"
fi