mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Allow to set cache dir in config file
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
3616fb629b
commit
56512e816f
@@ -372,6 +372,11 @@ func InitializeConfig(subCmdVs ...*cobra.Command) error {
|
||||
viper.Set("LayoutDir", layoutDir)
|
||||
}
|
||||
|
||||
if cacheDir != "" {
|
||||
viper.Set("CacheDir", cacheDir)
|
||||
}
|
||||
|
||||
cacheDir = viper.GetString("cacheDir")
|
||||
if cacheDir != "" {
|
||||
if helpers.FilePathSeparator != cacheDir[len(cacheDir)-1:] {
|
||||
cacheDir = cacheDir + helpers.FilePathSeparator
|
||||
|
Reference in New Issue
Block a user