diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-01-31 09:09:11 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-01-31 16:36:36 +0100 |
commit | 2bbc865f7bb713b2d0d2dbb02b90ae2621ad5367 (patch) | |
tree | cda2d88ec0079293780028d3f0fe699f839777e7 /commands/new_site.go | |
parent | 0792cfa9fae94a06a31e393a46fed3b1dd73b66a (diff) |
commands: Fix config environment handling
Fixes #6503
Fixes #6824
Diffstat (limited to 'commands/new_site.go')
-rw-r--r-- | commands/new_site.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/commands/new_site.go b/commands/new_site.go index f884a6433..9fb47096a 100644 --- a/commands/new_site.go +++ b/commands/new_site.go @@ -37,11 +37,11 @@ var _ cmder = (*newSiteCmd)(nil) type newSiteCmd struct { configFormat string - *baseCmd + *baseBuilderCmd } -func newNewSiteCmd() *newSiteCmd { - ccmd := &newSiteCmd{} +func (b *commandsBuilder) newNewSiteCmd() *newSiteCmd { + cc := &newSiteCmd{} cmd := &cobra.Command{ Use: "site [path]", @@ -49,15 +49,15 @@ func newNewSiteCmd() *newSiteCmd { Long: `Create a new site in the provided directory. The new site will have the correct structure, but no content or theme yet. Use ` + "`hugo new [contentPath]`" + ` to create new content.`, - RunE: ccmd.newSite, + RunE: cc.newSite, } - cmd.Flags().StringVarP(&ccmd.configFormat, "format", "f", "toml", "config & frontmatter format") + cmd.Flags().StringVarP(&cc.configFormat, "format", "f", "toml", "config & frontmatter format") cmd.Flags().Bool("force", false, "init inside non-empty directory") - ccmd.baseCmd = newBaseCmd(cmd) + cc.baseBuilderCmd = b.newBuilderBasicCmd(cmd) - return ccmd + return cc } |