File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,11 @@ endfunction(git_exec)
9494
9595function (remove_branch_if_exists BRANCH_NAME)
9696 message ("Attempting to delete ${BRANCH_NAME} if it exists" )
97- execute_process (COMMAND "${CTEST_GIT_COMMAND} " branch --list ${BRANCH_NAME}
97+ execute_process (COMMAND "${CTEST_GIT_COMMAND} " show-ref --quiet refs/heads/ ${BRANCH_NAME}
9898 WORKING_DIRECTORY "${CTEST_SOURCE_DIRECTORY} /${CTEST_PROJECT_NAME} "
9999 RESULT_VARIABLE BRANCH_RET)
100- message ("git branch --list returned: ${BRANCH_RET} ) !" )
101- if (BRANCH_RET)
100+ message ("git branch --list returned: ${BRANCH_RET} !" )
101+ if (NOT BRANCH_RET)
102102 message ("${BRANCH_NAME} exists. Attempting to delete it." )
103103 git_exec("branch -D ${BRANCH_NAME} " "Deleted ${BRANCH_NAME} ." )
104104 endif ()
You can’t perform that action at this time.
0 commit comments