Skip to content

Commit 38d9910

Browse files
committed
Use guard clause for git clone
1 parent a4f93bd commit 38d9910

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

infra/build/run.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ declare -r _GIT_REPO='[email protected]:ScottG489/unified-diff-parser.git'
1919
declare -r _RUN_TASK=$(jq -r .RUN_TASK <<< "$1")
2020
declare -r _GIT_BRANCH=$(jq -r .GIT_BRANCH <<< "$1")
2121

22-
if [ ! -d "$_PROJECT_NAME" ]; then
23-
git clone --branch $_GIT_BRANCH $_GIT_REPO
24-
fi
22+
[ -d "$_PROJECT_NAME" ] || git clone --branch $_GIT_BRANCH $_GIT_REPO
2523
cd $_PROJECT_NAME
2624

2725
build_test

0 commit comments

Comments
 (0)