Skip to content

Commit

Permalink
cmd/utils/flags.go: Applying a String len guard for the gitCommit par…
Browse files Browse the repository at this point in the history
…am of the NewApp()
  • Loading branch information
epappas committed Jan 2, 2018
1 parent 908faf8 commit 89be5f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func NewApp(gitCommit, usage string) *cli.App {
//app.Authors = nil
app.Email = ""
app.Version = params.Version
if gitCommit != "" {
if gitCommit != "" && len(gitCommit) >= 8 {
app.Version += "-" + gitCommit[:8]
}
app.Usage = usage
Expand Down

0 comments on commit 89be5f7

Please sign in to comment.