mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 21:53:48 +03: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
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue