feat(Envs): unifies overrides to PDA_DATA and PDA_CONFIG, and sets them to /tmp/ for tests.

This commit is contained in:
Lewis Wynne 2025-12-18 21:50:01 +00:00
parent f79434a8df
commit 7707dfbe86
4 changed files with 18 additions and 5 deletions

View file

@ -196,7 +196,7 @@ func (s *Store) open(name string) (*badger.DB, error) {
}
func (s *Store) path(args ...string) (string, error) {
if override := os.Getenv("PDA_DATA_DIR"); override != "" {
if override := os.Getenv("PDA_DATA"); override != "" {
if err := os.MkdirAll(override, 0o750); err != nil {
return "", err
}