fix: init cache first

This commit is contained in:
Jan De Dobbeleer 2022-01-18 21:25:18 +01:00 committed by Jan De Dobbeleer
parent 0a09924685
commit ad297dbe08

View file

@ -166,6 +166,8 @@ type environment struct {
func (env *environment) init(args *args) {
env.args = args
env.fileCache = &fileCache{}
env.fileCache.init(env.getCachePath())
env.resolveConfigPath()
env.cmdCache = &commandCache{
commands: newConcurrentMap(),
@ -174,8 +176,6 @@ func (env *environment) init(args *args) {
env.debug = true
log.SetOutput(&env.logBuilder)
}
env.fileCache = &fileCache{}
env.fileCache.init(env.getCachePath())
}
func (env *environment) resolveConfigPath() {