Skip to content

Commit 34daea6

Browse files
committed
Ensure variables are present when used
1 parent d81d4d6 commit 34daea6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ci/script/functions.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ fi
1717
function clone_repo {
1818
if [ ! -d $1 ]; then # don't clone if the dir is already there
1919
if [ -z "$2" ]; then
20-
BRANCH_TO_CLONE="$MAINTENANCE_BRANCH"
20+
BRANCH_TO_CLONE="${MAINTENANCE_BRANCH?}";
2121
else
22-
BRANCH_TO_CLONE="$2"
23-
fi
22+
BRANCH_TO_CLONE="$2";
23+
fi;
2424

25-
travis_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $BRANCH_TO_CLONE"
25+
travis_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?}"
2626
fi;
2727
}
2828

0 commit comments

Comments
 (0)