diff --git a/versioncontrol/git.groovy b/versioncontrol/git.groovy index cea31fc..36f4c64 100644 --- a/versioncontrol/git.groovy +++ b/versioncontrol/git.groovy @@ -119,14 +119,12 @@ def checkRepoExists(String gitURL) { if (isUnix()) { result = sh( script: """ git ls-remote "${gitURL}" CHECK_GIT_REMOTE_URL_REACHABILITY - if [ \$? -ne 0 ]; then exit 1; fi """, returnStatus: true ) } else { result = bat( script: """ - git ls-remote "${gitURL}" CHECK_GIT_REMOTE_URL_REACHABILITY - if errorlevel 1 EXIT /b 1 + @git ls-remote "${gitURL}" CHECK_GIT_REMOTE_URL_REACHABILITY """, returnStatus: true )