Skip to content

Commit

Permalink
SCAN-5687 : Include ref in error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
steviemul committed Sep 10, 2024
1 parent 514d2b2 commit 9215789
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9215789

Please sign in to comment.