Looks like gitVersion() is failing due to the --match pattern not including quotes
What did you want to happen?
Calling gitVersion() should print the correct version when providing no pattern
Looking through the source code I have found that gitVersion() basically is a call to git describe --tags --always --first-parent --abbrev=7 --match=* HEAD which fails with the following error when run directly: no matches found: --match=* and resulting in an unknown version.
It seems that the correct command would be git describe --tags --always --first-parent --abbrev=7 --match='*' HEAD (notice the '' for the match), which gives the correct tag to work with.
It seems kind of weird to me that this would not have been noticed already, so maybe I am using the API wrongly?
What happened?
Looks like
gitVersion()
is failing due to the--match
pattern not including quotesWhat did you want to happen?
Calling
gitVersion()
should print the correct version when providing no patternLooking through the source code I have found that
gitVersion()
basically is a call togit describe --tags --always --first-parent --abbrev=7 --match=* HEAD
which fails with the following error when run directly:no matches found: --match=*
and resulting in anunknown
version.It seems that the correct command would be
git describe --tags --always --first-parent --abbrev=7 --match='*' HEAD
(notice the''
for thematch
), which gives the correct tag to work with.It seems kind of weird to me that this would not have been noticed already, so maybe I am using the API wrongly?
My git version is
2.43.0