From f8625bcad86e93055e237aabd49630b2687ccb92 Mon Sep 17 00:00:00 2001 From: James Ives Date: Mon, 4 Mar 2019 10:10:49 -0500 Subject: [PATCH] Pipe to wc --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 && \