From 89be5f76f810deb5d9a13965aa28cef2ebf4c915 Mon Sep 17 00:00:00 2001 From: Evangelos Pappas Date: Tue, 2 Jan 2018 09:32:03 +0000 Subject: [PATCH] cmd/utils/flags.go: Applying a String len guard for the gitCommit param of the NewApp() --- cmd/utils/flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 30edf199c9..a755eb3031 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -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