Skip to content

Commit

Permalink
don't run a command with error
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Aug 29, 2018
1 parent 3e8390e commit 1e2f443
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions travis-prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ if [ ! -d ../stash ]; then
set -x
git clone https://github.com/$GITHUB_USER/stash

echo "Checking out stash branch ${BRANCH}"

cd stash
git checkout ${BRANCH}
if [ $? -ne 0 ]; then
echo "No such branch ${BRANCH}, checking out master"

if git checkout ${BRANCH}; then
echo "Checking out stash branch ${BRANCH}"
else
echo "No branch ${BRANCH}, checking out master"
git checkout master
fi

Expand Down

0 comments on commit 1e2f443

Please sign in to comment.