From fa73cf932b35fe670886f4441fc46f808428c315 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 22 Dec 2021 14:05:47 -0800 Subject: [PATCH] Error if submodule fetch fails. --- src/ci/init_repo.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ci/init_repo.sh b/src/ci/init_repo.sh index 3c61dcc9d9c..217192af2fe 100755 --- a/src/ci/init_repo.sh +++ b/src/ci/init_repo.sh @@ -62,6 +62,7 @@ for i in ${!modules[@]}; do url=${urls[$i]} url=${url/\.git/} fetch_github_commit_archive $module "$url/archive/$commit.tar.gz" & + bg_pids[${i}]=$! continue else use_git="$use_git $module" @@ -70,4 +71,9 @@ done retry sh -c "git submodule deinit -f $use_git && \ git submodule sync && \ git submodule update -j 16 --init --recursive $use_git" -wait +STATUS=0 +for pid in ${bg_pids[*]} +do + wait $pid || STATUS=1 +done +exit ${STATUS}