diff options
author | Bjørn Erik Pedersen <[email protected]> | 2018-04-10 09:19:26 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2018-04-11 09:50:19 +0200 |
commit | 4d32f2fa8969f368b088dc9bcedb45f2c986cb27 (patch) | |
tree | a091c49f6011605f08b92b9dbdb2d2acdd87f9ce /commands/new_theme.go | |
parent | 018602c46db8d729af2871bd5f4c1e7480420f09 (diff) | |
download | hugo-4d32f2fa8969f368b088dc9bcedb45f2c986cb27.tar.gz hugo-4d32f2fa8969f368b088dc9bcedb45f2c986cb27.zip |
commands: Make the hugo command non-global
See #4598
Diffstat (limited to 'commands/new_theme.go')
-rw-r--r-- | commands/new_theme.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/commands/new_theme.go b/commands/new_theme.go index 4ff239f22..64220a8fc 100644 --- a/commands/new_theme.go +++ b/commands/new_theme.go @@ -31,15 +31,11 @@ import ( var _ cmder = (*newThemeCmd)(nil) type newThemeCmd struct { - cmd *cobra.Command -} - -func (c *newThemeCmd) getCommand() *cobra.Command { - return c.cmd + *baseCmd } func newNewThemeCmd() *newThemeCmd { - ccmd := &newThemeCmd{} + ccmd := &newThemeCmd{newBaseCmd(nil)} cmd := &cobra.Command{ Use: "theme [name]", @@ -57,7 +53,7 @@ as you see fit.`, } func (n *newThemeCmd) newTheme(cmd *cobra.Command, args []string) error { - c, err := InitializeConfig(false, nil) + c, err := initializeConfig(false, nil, n, nil) if err != nil { return err |