Skip to content
Snippets Groups Projects
Commit 16d953b9 authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

BUG: allow 3 retry for remote module cloning

parent e459c96c
No related branches found
No related tags found
No related merge requests found
...@@ -22,12 +22,17 @@ ...@@ -22,12 +22,17 @@
# Helper to perform the initial git clone and checkout. # Helper to perform the initial git clone and checkout.
function(_git_clone git_executable git_repository git_tag module_dir) function(_git_clone git_executable git_repository git_tag module_dir)
execute_process( set(retryCount 0)
COMMAND "${git_executable}" clone "${git_repository}" "${module_dir}" set(error_code 1)
RESULT_VARIABLE error_code while(error_code AND (retryCount LESS 3))
OUTPUT_QUIET execute_process(
ERROR_QUIET COMMAND "${git_executable}" clone "${git_repository}" "${module_dir}"
) RESULT_VARIABLE error_code
OUTPUT_QUIET
ERROR_QUIET
)
math(EXPR retryCount "${retryCount}+1")
endwhile()
if(error_code) if(error_code)
message(FATAL_ERROR "Failed to clone repository: '${git_repository}'") message(FATAL_ERROR "Failed to clone repository: '${git_repository}'")
endif() endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment