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

Adds version() function #108

Merged
merged 1 commit into from
Sep 3, 2024
Merged

Conversation

molynerd
Copy link
Contributor

@molynerd molynerd commented Aug 8, 2024

resolves #107

what I like

It's fairly concise and easy to use.

what I don't like

It doesn't honor the command arg on the default function and I don't think it should either. The point of version() is to understand what the lib is going to do by default. Ideally, it's something that you log or store for triage purposes. If an implementer is calling ogr2ogr from a novel location, I suspect that knowing the version number isn't something they're interested in. Additionally, honoring the command arg would require significant rework of the default function, as the input arg would not make sense in the context of getting the version of the command line utility. Alternatively, one could argue that the version function could simply take in a command arg and solve this problem, but I'm not sure if that's desired. Happy to take feedback here.

@wavded wavded self-assigned this Sep 3, 2024
@wavded wavded self-requested a review September 3, 2024 16:38
@wavded wavded merged commit 7eca1c3 into wavded:master Sep 3, 2024
3 checks passed
@wavded
Copy link
Owner

wavded commented Sep 3, 2024

@molynerd Thanks so much. Sorry I was busy and then on vacation so did not get to this till now. I think this will work for now, is simple and unobtrusive.

@molynerd molynerd deleted the 107_print-version branch September 6, 2024 23:57
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

Successfully merging this pull request may close these issues.

Print ogr2ogr CLI version
2 participants