summaryrefslogtreecommitdiffstats
path: root/commands/new.go
diff options
context:
space:
mode:
authorHyeonGyu Lee <vazrupe@naver.com>2019-08-15 16:33:47 +0900
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-15 09:33:47 +0200
commitea9261e856c13c1d4ae05fcca08766d410b4b65c (patch)
tree70c68f81d682dff217848bee8b215369ad4a94ea /commands/new.go
parent37f592980315de1890363d4234274a16567a6da0 (diff)
commands: Make sure the hugo field is always initialized before it's used
Wrap the field to make it accessible after initialization. Fixes #6193
Diffstat (limited to 'commands/new.go')
-rw-r--r--commands/new.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/new.go b/commands/new.go
index 649be521e..4fc0d4ed4 100644
--- a/commands/new.go
+++ b/commands/new.go
@@ -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) {