Skip to content

Commit fa73cf9

Browse files
committed
Error if submodule fetch fails.
1 parent edda7e9 commit fa73cf9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Diff for: src/ci/init_repo.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ for i in ${!modules[@]}; do
6262
url=${urls[$i]}
6363
url=${url/\.git/}
6464
fetch_github_commit_archive $module "$url/archive/$commit.tar.gz" &
65+
bg_pids[${i}]=$!
6566
continue
6667
else
6768
use_git="$use_git $module"
@@ -70,4 +71,9 @@ done
7071
retry sh -c "git submodule deinit -f $use_git && \
7172
git submodule sync && \
7273
git submodule update -j 16 --init --recursive $use_git"
73-
wait
74+
STATUS=0
75+
for pid in ${bg_pids[*]}
76+
do
77+
wait $pid || STATUS=1
78+
done
79+
exit ${STATUS}

0 commit comments

Comments
 (0)