From 9af654fb28e93396c128a571be4ab365fbd2bd45 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Fri, 3 May 2019 15:20:36 +0100 Subject: [PATCH] Rather than check out a release repo to see if it exists or not use git ls-remote to establish if it exists --- versioncontrol/git.groovy | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 )