Closed gandarez closed 3 years ago
As we discussed git
commands mixes up many result codes and do not always return an error. For example if we run both commands in a clean repository, the first command returns empty but the second returns an error and exits with code 128.
git tag --points-at HEAD --sort -version:creatordate
git describe --tags --abbrev=0
So the last commit I ignored errors for LatestTag
and AncestorTag
.
Alright, so we ignore errors completely. Anyway, in case result will be something invalid, it will fail on semver parsing, right?
Yep I think it's a good approach for that scenario.
This PR fixes
LatestTag
andAncestorTag
funcs to correctly validate for string empty.