From 9215789c436d9755e0f330b883793def98718018 Mon Sep 17 00:00:00 2001 From: Stephen Mulrennan Date: Tue, 10 Sep 2024 10:41:18 +0100 Subject: [PATCH] SCAN-5687 : Include ref in error message. --- src/config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.js b/src/config.js index ae17187..9c46835 100644 --- a/src/config.js +++ b/src/config.js @@ -25,15 +25,16 @@ const getRef = () => { const thisBranchName = () => { + const ref = getRef(); + try { - const ref = getRef(); const refParts = ref.split('/'); return refParts[refParts.length-1]; } catch (error) { - core.error(`Unable to get current branch name : ${error.message}`); + core.error(`Unable to get current branch name from ref ${ref} : ${error.message}`); } return DEFAULT_BRANCH_NAME