cli: remove stray whitespace when loading the consul version from the VERSION file

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

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

to

    Consul v1.16.0-dev+ent
    Revision 56b86acbe5+CHANGES
pull/16467/head
R.B. Boyer 2023-02-28 14:12:40 -06:00
parent 29db217a0e
commit e734b0c1df
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ var (
//go:embed VERSION //go:embed VERSION
fullVersion string fullVersion string
Version, VersionPrerelease, _ = strings.Cut(fullVersion, "-") Version, VersionPrerelease, _ = strings.Cut(strings.TrimSpace(fullVersion), "-")
// https://semver.org/#spec-item-10 // https://semver.org/#spec-item-10
VersionMetadata = "" VersionMetadata = ""