From 7e02953285fc1d4bce58e8603fd0123bc012de84 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Thu, 27 Jun 2024 16:20:14 +0200 Subject: [PATCH] feat: :sparkles: add error handling to fetching git tags if none found --- plugin/util.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/util.go b/plugin/util.go index 8e452e7..58aee99 100644 --- a/plugin/util.go +++ b/plugin/util.go @@ -62,7 +62,9 @@ func getLatestGitTag(options ...GetLatestGitTagOption) (tag string, err error) { tag = strings.Join(parts[2:], "/") } - fmt.Println(tag) + if tag == "" { + return tag, fmt.Errorf("couldn't find any git tags") + } return }