1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

commands: Add CLI tests

See #4598
This commit is contained in:
Bjørn Erik Pedersen
2018-04-10 19:16:09 +02:00
parent 4d32f2fa89
commit e8d6ca9531
10 changed files with 199 additions and 71 deletions

View File

@@ -32,10 +32,11 @@ var _ cmder = (*newThemeCmd)(nil)
type newThemeCmd struct {
*baseCmd
hugoBuilderCommon
}
func newNewThemeCmd() *newThemeCmd {
ccmd := &newThemeCmd{newBaseCmd(nil)}
ccmd := &newThemeCmd{baseCmd: newBaseCmd(nil)}
cmd := &cobra.Command{
Use: "theme [name]",
@@ -53,7 +54,7 @@ as you see fit.`,
}
func (n *newThemeCmd) newTheme(cmd *cobra.Command, args []string) error {
c, err := initializeConfig(false, nil, n, nil)
c, err := initializeConfig(false, &n.hugoBuilderCommon, n, nil)
if err != nil {
return err