diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-10 09:19:26 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-04-11 09:50:19 +0200 |
commit | 4d32f2fa8969f368b088dc9bcedb45f2c986cb27 (patch) | |
tree | a091c49f6011605f08b92b9dbdb2d2acdd87f9ce /commands/new_site.go | |
parent | 018602c46db8d729af2871bd5f4c1e7480420f09 (diff) |
commands: Make the hugo command non-global
See #4598
Diffstat (limited to 'commands/new_site.go')
-rw-r--r-- | commands/new_site.go | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/commands/new_site.go b/commands/new_site.go index bad74682d..4e3aab1db 100644 --- a/commands/new_site.go +++ b/commands/new_site.go @@ -40,11 +40,7 @@ var _ cmder = (*newSiteCmd)(nil) type newSiteCmd struct { configFormat string - cmd *cobra.Command -} - -func (c *newSiteCmd) getCommand() *cobra.Command { - return c.cmd + *baseCmd } func newNewSiteCmd() *newSiteCmd { @@ -62,7 +58,7 @@ Use ` + "`hugo new [contentPath]`" + ` to create new content.`, cmd.Flags().StringVarP(&ccmd.configFormat, "format", "f", "toml", "config & frontmatter format") cmd.Flags().Bool("force", false, "init inside non-empty directory") - ccmd.cmd = cmd + ccmd.baseCmd = newBaseCmd(cmd) return ccmd |