diff --git a/entrypoint.sh b/entrypoint.sh index 1ee7602e..8101a269 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -42,7 +42,7 @@ git config --global user.name "${COMMIT_NAME}" && \ # Checks to see if the remote exists prior to deploying. # If the branch doesn't exist it gets created here as an orphan. -if [ `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:JamesIves/reddit-viewer.git" $BRANCH` ] +if [ `git ls-remote --heads "https://${ACCESS_TOKEN}@github.com:JamesIves/reddit-viewer.git" $BRANCH | wc -l` ] then echo "Creating remote branch ${BRANCH} as it doesn't exist..." git checkout --orphan $BRANCH && \