From 2bbc865f7bb713b2d0d2dbb02b90ae2621ad5367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 31 Jan 2020 09:09:11 +0100 Subject: commands: Fix config environment handling Fixes #6503 Fixes #6824 --- commands/new_theme.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'commands/new_theme.go') 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 -- cgit v1.2.3