update_android_components: don't create an empty PR if we couldn't push

This commit is contained in:
Julien Cristau 2022-08-19 17:38:36 +02:00 committed by mergify[bot]
parent 5950157911
commit 8c0945db3b
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ fi
echo "Pushing branch to GitHub"
URL="https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/$GITHUB_USER/$REPO/"
# XXX git sometimes leaks the URL including the token when the network request failed (regardless of --quiet).
git push --force --no-verify --quiet "$URL" "$BRANCH" > /dev/null 2>&1 || echo "Failed ($?)"
git push --force --no-verify --quiet "$URL" "$BRANCH" > /dev/null 2>&1 || { echo "Failed ($?)"; exit 1; }
# Open a PR if needed
if [[ $(hub pr list --head "$GITHUB_USER:$BRANCH") ]]; then