commands: Make the hugo command non-global

See #4598
This commit is contained in:
Bjørn Erik Pedersen
2018-04-10 09:19:26 +02:00
parent 018602c46d
commit 4d32f2fa89
23 changed files with 299 additions and 336 deletions

View File

@@ -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