Browse Source

cmd: Fix paths when using an env file (#4296)

* core: Fix paths when using an env file

* refactor: move path logic to loadFromEnv
master
Pascal Zarrad 3 years ago
committed by GitHub
parent
commit
ce5a45db45
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      cmd/main.go

5
cmd/main.go

@ -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…
Cancel
Save