comands: Make the config command non-global

See #4598
This commit is contained in:
Bjørn Erik Pedersen
2018-04-09 20:05:09 +02:00
parent 56a1308044
commit 15b1e269ad
4 changed files with 26 additions and 27 deletions

View File

@@ -29,6 +29,10 @@ type versionCmd struct {
cmd *cobra.Command
}
func (c *versionCmd) getCommand() *cobra.Command {
return c.cmd
}
func newVersionCmd() *versionCmd {
return &versionCmd{
&cobra.Command{
@@ -43,10 +47,6 @@ func newVersionCmd() *versionCmd {
}
}
func (c *versionCmd) getCommand() *cobra.Command {
return c.cmd
}
func printHugoVersion() {
if hugolib.CommitHash == "" {
jww.FEEDBACK.Printf("Hugo Static Site Generator v%s %s/%s BuildDate: %s\n", helpers.CurrentHugoVersion, runtime.GOOS, runtime.GOARCH, hugolib.BuildDate)