Skip to content

Commit

Permalink
cli: remove stray whitespace when loading the consul version from the…
Browse files Browse the repository at this point in the history
… VERSION file

Fixes a regression from #15631 in the output of `consul version` from:

    Consul v1.16.0-dev
    +ent
    Revision 56b86ac+CHANGES

to

    Consul v1.16.0-dev+ent
    Revision 56b86ac+CHANGES
  • Loading branch information
rboyer committed Feb 28, 2023
1 parent 29db217 commit e734b0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
//go:embed VERSION
fullVersion string

Version, VersionPrerelease, _ = strings.Cut(fullVersion, "-")
Version, VersionPrerelease, _ = strings.Cut(strings.TrimSpace(fullVersion), "-")

// https://semver.org/#spec-item-10
VersionMetadata = ""
Expand Down

0 comments on commit e734b0c

Please sign in to comment.