commands: Make sure the hugo field is always initialized before it's used

Wrap the field to make it accessible after initialization.

Fixes #6193
This commit is contained in:
HyeonGyu Lee 2019-08-15 16:33:47 +09:00 committed by Bjørn Erik Pedersen
parent 37f5929803
commit ea9261e856
8 changed files with 54 additions and 40 deletions

View file

@ -85,13 +85,13 @@ func (n *newCmd) newContent(cmd *cobra.Command, args []string) error {
var kind string
createPath, kind = newContentPathSection(c.hugo, createPath)
createPath, kind = newContentPathSection(c.hugo(), createPath)
if n.contentType != "" {
kind = n.contentType
}
return create.NewContent(c.hugo, kind, createPath)
return create.NewContent(c.hugo(), kind, createPath)
}
func mkdir(x ...string) {