mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
display version correctly
This commit is contained in:
parent
56d73a5b83
commit
f0e83beaaa
2 changed files with 2 additions and 2 deletions
|
|
@ -40,7 +40,7 @@ func (c *VersionCommand) Run(args []string) int {
|
|||
var versionString bytes.Buffer
|
||||
fmt.Fprintf(&versionString, "Packer v%s", c.Version)
|
||||
if c.VersionPrerelease != "" {
|
||||
fmt.Fprintf(&versionString, ".%s", c.VersionPrerelease)
|
||||
fmt.Fprintf(&versionString, "-%s", c.VersionPrerelease)
|
||||
|
||||
if c.Revision != "" {
|
||||
fmt.Fprintf(&versionString, " (%s)", c.Revision)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ func FormattedVersion() string {
|
|||
var versionString bytes.Buffer
|
||||
fmt.Fprintf(&versionString, "%s", Version)
|
||||
if VersionPrerelease != "" {
|
||||
fmt.Fprintf(&versionString, ".%s", VersionPrerelease)
|
||||
fmt.Fprintf(&versionString, "-%s", VersionPrerelease)
|
||||
|
||||
if GitCommit != "" {
|
||||
fmt.Fprintf(&versionString, " (%s)", GitCommit)
|
||||
|
|
|
|||
Loading…
Reference in a new issue