summaryrefslogtreecommitdiffstats
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorDimitri Merejkowsky <dmerejkowsky@users.noreply.github.com>2016-10-09 11:00:36 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-10-09 11:00:36 +0200
commit56512e816fc88f90a7643526d93358fa4761200d (patch)
tree3868f53aba16002e26098b9954e7bae10ef6d74e /commands/hugo.go
parent3616fb629b33d8f2ac91eea77932e24076e31d1b (diff)
Allow to set cache dir in config file
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go5
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
}