build-system: correctly test that branch was created

That '-b' was exactly the wrong thing to do here...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2024-01-10 13:29:10 -08:00
parent 744257149f
commit ca5f7fa4bf

View file

@ -48,7 +48,7 @@ else
# someone else was faster - get the number they wrote
git checkout main &> /dev/null
git branch -D "$SHA_BRANCH" &> /dev/null
if ! git checkout -b "$SHA_BRANCH" &> /dev/null
if ! git checkout "$SHA_BRANCH" &> /dev/null
then
echo "push to $SHA_BRANCH failed, but switching to it failed as well"
exit 2