Skip to content

Commit 731b9be

Browse files
committed
Merge pull request #9 from moltam/fix/empty-tag-list
Fixed returning non empty tag list when there are no tags.
2 parents 59330e2 + c6f4b6b commit 731b9be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

repo_tag.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ func (repo *Repository) GetTags() ([]string, error) {
103103
return nil, err
104104
}
105105

106-
tags := strings.Split(strings.TrimSpace(stdout), "\n")
106+
tags := strings.Split(stdout, "\n")
107+
tags = tags[:len(tags)-1]
107108

108109
if version.Compare(gitVersion, "2.0.0", "<") {
109110
version.Sort(tags)

0 commit comments

Comments
 (0)