summaryrefslogtreecommitdiffstats
path: root/commands/env.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-10 09:19:26 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-11 09:50:19 +0200
commit4d32f2fa8969f368b088dc9bcedb45f2c986cb27 (patch)
treea091c49f6011605f08b92b9dbdb2d2acdd87f9ce /commands/env.go
parent018602c46db8d729af2871bd5f4c1e7480420f09 (diff)
commands: Make the hugo command non-global
See #4598
Diffstat (limited to 'commands/env.go')
-rw-r--r--commands/env.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/commands/env.go b/commands/env.go
index 700cddf5a..76c16b93b 100644
--- a/commands/env.go
+++ b/commands/env.go
@@ -23,15 +23,11 @@ import (
var _ cmder = (*envCmd)(nil)
type envCmd struct {
- cmd *cobra.Command
-}
-
-func (c *envCmd) getCommand() *cobra.Command {
- return c.cmd
+ *baseCmd
}
func newEnvCmd() *envCmd {
- return &envCmd{cmd: &cobra.Command{
+ return &envCmd{baseCmd: newBaseCmd(&cobra.Command{
Use: "env",
Short: "Print Hugo version and environment info",
Long: `Print Hugo version and environment info. This is useful in Hugo bug reports.`,
@@ -43,6 +39,6 @@ func newEnvCmd() *envCmd {
return nil
},
- },
+ }),
}
}