Skip to content

Commit 67d723a

Browse files
committed
fix: fetch git remote add in one go + non-fatal errors
1 parent e8d9925 commit 67d723a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/Git.cmake

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,12 +346,8 @@ function(git_add_remote)
346346
endif()
347347

348348
execute_process(
349-
COMMAND "${GIT_EXECUTABLE}" "remote" "add" "${_fun_REMOTE_NAME}" "${_fun_REMOTE_URL}"
350-
WORKING_DIRECTORY "${_fun_REPOSITORY_PATH}" COMMAND_ERROR_IS_FATAL LAST
351-
)
352-
execute_process(
353-
COMMAND "${GIT_EXECUTABLE}" "fetch" "${_fun_REMOTE_NAME}" WORKING_DIRECTORY "${_fun_REPOSITORY_PATH}"
354-
COMMAND_ERROR_IS_FATAL LAST
349+
COMMAND "${GIT_EXECUTABLE}" "remote" "add" "--fetch" "${_fun_REMOTE_NAME}" "${_fun_REMOTE_URL}"
350+
WORKING_DIRECTORY "${_fun_REPOSITORY_PATH}"
355351
)
356352
endif()
357353
endfunction()

0 commit comments

Comments
 (0)