mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 15:19:25 +08:00
cmd: Fix paths when using an env file (#4296)
* core: Fix paths when using an env file * refactor: move path logic to loadFromEnv
This commit is contained in:
parent
e0a6a1efff
commit
ce5a45db45
|
@ -361,6 +361,11 @@ func loadEnvFromFile(envFile string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the storage paths to ensure they have the proper
|
||||||
|
// value after loading a specified env file.
|
||||||
|
caddy.ConfigAutosavePath = filepath.Join(caddy.AppConfigDir(), "autosave.json")
|
||||||
|
caddy.DefaultStorage = &certmagic.FileStorage{Path: caddy.AppDataDir()}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user