summaryrefslogtreecommitdiffstats
path: root/commands/new_theme.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-31 09:09:11 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-31 16:36:36 +0100
commit2bbc865f7bb713b2d0d2dbb02b90ae2621ad5367 (patch)
treecda2d88ec0079293780028d3f0fe699f839777e7 /commands/new_theme.go
parent0792cfa9fae94a06a31e393a46fed3b1dd73b66a (diff)
commands: Fix config environment handling
Fixes #6503 Fixes #6824
Diffstat (limited to 'commands/new_theme.go')
-rw-r--r--commands/new_theme.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/commands/new_theme.go b/commands/new_theme.go
index a0a4e89e3..ee3437360 100644
--- a/commands/new_theme.go
+++ b/commands/new_theme.go
@@ -29,12 +29,11 @@ import (
var _ cmder = (*newThemeCmd)(nil)
type newThemeCmd struct {
- *baseCmd
- hugoBuilderCommon
+ *baseBuilderCmd
}
-func newNewThemeCmd() *newThemeCmd {
- ccmd := &newThemeCmd{baseCmd: newBaseCmd(nil)}
+func (b *commandsBuilder) newNewThemeCmd() *newThemeCmd {
+ cc := &newThemeCmd{}
cmd := &cobra.Command{
Use: "theme [name]",
@@ -43,12 +42,12 @@ func newNewThemeCmd() *newThemeCmd {
New theme is a skeleton. Please add content to the touched files. Add your
name to the copyright line in the license and adjust the theme.toml file
as you see fit.`,
- RunE: ccmd.newTheme,
+ RunE: cc.newTheme,
}
- ccmd.cmd = cmd
+ cc.baseBuilderCmd = b.newBuilderBasicCmd(cmd)
- return ccmd
+ return cc
}
// newTheme creates a new Hugo theme template