Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-10 10:19:26 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-11 10:50:19 +0300
commit4d32f2fa8969f368b088dc9bcedb45f2c986cb27 (patch)
treea091c49f6011605f08b92b9dbdb2d2acdd87f9ce /commands/new_site.go
parent018602c46db8d729af2871bd5f4c1e7480420f09 (diff)
commands: Make the hugo command non-global
See #4598
Diffstat (limited to 'commands/new_site.go')
-rw-r--r--commands/new_site.go8
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