Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitVersion() is failing due to the --match pattern not including quotes #839

Open
kihaki opened this issue Sep 25, 2024 · 0 comments
Open

Comments

@kihaki
Copy link

kihaki commented Sep 25, 2024

What happened?

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?

My git version is 2.43.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant