diff options
Diffstat (limited to 'commands/version.go')
-rw-r--r-- | commands/version.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/version.go b/commands/version.go index f775f2e33..56c134bc5 100644 --- a/commands/version.go +++ b/commands/version.go @@ -32,7 +32,7 @@ var version = &cobra.Command{ Use: "version", Short: "Print the version number of Hugo", Long: `All software has versions. This is Hugo's.`, - Run: func(cmd *cobra.Command, args []string) { + RunE: func(cmd *cobra.Command, args []string) error { if hugolib.BuildDate == "" { setBuildDate() // set the build date from executable's mdate } else { @@ -43,6 +43,8 @@ var version = &cobra.Command{ } else { fmt.Printf("Hugo Static Site Generator v%s-%s BuildDate: %s\n", helpers.HugoVersion(), strings.ToUpper(hugolib.CommitHash), hugolib.BuildDate) } + + return nil }, } |