diff options
author | HyeonGyu Lee <vazrupe@naver.com> | 2019-08-15 16:33:47 +0900 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-15 09:33:47 +0200 |
commit | ea9261e856c13c1d4ae05fcca08766d410b4b65c (patch) | |
tree | 70c68f81d682dff217848bee8b215369ad4a94ea /commands/mod.go | |
parent | 37f592980315de1890363d4234274a16567a6da0 (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/mod.go')
-rw-r--r-- | commands/mod.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/mod.go b/commands/mod.go index 04442a9b2..5fbd93ecb 100644 --- a/commands/mod.go +++ b/commands/mod.go @@ -157,7 +157,7 @@ Also note that if you configure a positive maxAge for the "modules" file cache, return err } - _, err = com.hugo.FileCaches.ModulesCache().Prune(true) + _, err = com.hugo().FileCaches.ModulesCache().Prune(true) return err }, @@ -176,7 +176,7 @@ func (c *modCmd) withModsClient(failOnMissingConfig bool, f func(*modules.Client return err } - return f(com.hugo.ModulesClient) + return f(com.hugo().ModulesClient) } func (c *modCmd) initConfig(failOnNoConfig bool) (*commandeer, error) { |