From 0e28922491e9c5694cba6321acf1b7b0118dd1af Mon Sep 17 00:00:00 2001 From: weissmall Date: Mon, 4 Dec 2023 15:08:56 +0300 Subject: [PATCH] Added error handling for git config --- helpers.groovy | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helpers.groovy b/helpers.groovy index 291d0de..c28c0f1 100644 --- a/helpers.groovy +++ b/helpers.groovy @@ -44,8 +44,9 @@ def withGiteaCreds(String credentialsId, String gitToolName, Closure body) { gitToolName: gitToolName ) ]) { - sh "git config user.name ${env.GIT_USERNAME}" - sh "git config user.email admin@dipal.ru" + errorMessage = "Unable to set git config" + sh "git config user.name ${env.GIT_USERNAME} || echo $errorMessage" + sh "git config user.email admin@dipal.ru || echo $errorMessage" body() } }