feat(Envs): unifies overrides to PDA_DATA and PDA_CONFIG, and sets them to /tmp/ for tests.
This commit is contained in:
parent
f79434a8df
commit
7707dfbe86
4 changed files with 18 additions and 5 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue