store: fix root directory

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-04-01 22:16:29 -07:00
parent 896d303f4a
commit d848afe7a9

View File

@ -46,11 +46,11 @@ func NewStore(root string) (*Store, error) {
} }
func DefaultStore() (*Store, error) { func DefaultStore() (*Store, error) {
root := defaultStoreRoot if root := os.Getenv("DAGGER_STORE"); root != "" {
if r := os.Getenv("DAGGER_STORE"); r != "" { return NewStore(root)
root = r
} }
return NewStore(root)
return NewStore(os.ExpandEnv(defaultStoreRoot))
} }
func (s *Store) deploymentPath(name string) string { func (s *Store) deploymentPath(name string) string {