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

version string is reported inconsistently #5893

Closed
nestor-custodio opened this issue Oct 13, 2023 · 3 comments
Closed

version string is reported inconsistently #5893

nestor-custodio opened this issue Oct 13, 2023 · 3 comments
Labels
good first issue 🐤 Good for newcomers
Milestone

Comments

@nestor-custodio
Copy link

Love the new -v / --version CLI flags, but I did notice the version text is not exactly the same when you issue a caddy version (which terminates the printed version string with a newline) and when you issue a caddy -v / caddy --version (which doesn't).

This is a very minor item, but it did break my update check automation when I updated it to run --version instead of version, and I imagine it might be an issue for other (more important) tooling elsewhere.


caddy version:

(0) nestor@compy9000 ~/links $caddy version
v2.7.5 h1:HoysvZkLcN2xJExEepaFHK92Qgs7xAiCFydN5x5Hs6Q=
(0) nestor@compy9000 ~/links $

caddy -v / caddy --version:

(0) nestor@compy9000 ~/links $caddy -v
v2.7.5 h1:HoysvZkLcN2xJExEepaFHK92Qgs7xAiCFydN5x5Hs6Q=(0) nestor@compy9000 ~/links $
(0) nestor@compy9000 ~/links $caddy --version
v2.7.5 h1:HoysvZkLcN2xJExEepaFHK92Qgs7xAiCFydN5x5Hs6Q=(0) nestor@compy9000 ~/links $
@mohammed90 mohammed90 added the good first issue 🐤 Good for newcomers label Oct 13, 2023
@mohammed90 mohammed90 added this to the v2.7.6 milestone Oct 13, 2023
@francislavoie
Copy link
Member

Oh I guess it's just missing a newline? Hah 😅 I think we just need to add a \n to

rootCmd.SetVersionTemplate("{{.Version}}")

@encg
Copy link

encg commented Oct 14, 2023

Oh I guess it's just missing a newline? Hah 😅 I think we just need to add a \n to

rootCmd.SetVersionTemplate("{{.Version}}")

I'd like to make this PR if you don't mind 😄

@mholt
Copy link
Member

mholt commented Oct 14, 2023

@encg Sure, might as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue 🐤 Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants