diff options
author | Dimitri Merejkowsky <dmerejkowsky@users.noreply.github.com> | 2016-10-09 11:00:36 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-10-09 11:00:36 +0200 |
commit | 56512e816fc88f90a7643526d93358fa4761200d (patch) | |
tree | 3868f53aba16002e26098b9954e7bae10ef6d74e /commands/hugo.go | |
parent | 3616fb629b33d8f2ac91eea77932e24076e31d1b (diff) |
Allow to set cache dir in config file
Diffstat (limited to 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index 4c6a0597c..4c284737d 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -373,6 +373,11 @@ func InitializeConfig(subCmdVs ...*cobra.Command) error { } if cacheDir != "" { + viper.Set("CacheDir", cacheDir) + } + + cacheDir = viper.GetString("cacheDir") + if cacheDir != "" { if helpers.FilePathSeparator != cacheDir[len(cacheDir)-1:] { cacheDir = cacheDir + helpers.FilePathSeparator } |