Skip to content

Commit 11128c5

Browse files
committed
fix: make sure git is installed before using it
1 parent 16de795 commit 11128c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/helpers.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ function helper::trim() {
181181
}
182182

183183
function helpers::get_latest_tag() {
184+
if ! dependencies::has_git; then
185+
return 1
186+
fi
187+
184188
git ls-remote --tags "$BASHUNIT_GIT_REPO" |
185189
awk '{print $2}' |
186190
sed 's|^refs/tags/||' |

0 commit comments

Comments
 (0)