From d848afe7a9b446fcf3c492c7986b3506b7c8b26e Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 1 Apr 2021 22:16:29 -0700 Subject: [PATCH] store: fix root directory Signed-off-by: Andrea Luzzardi --- dagger/store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dagger/store.go b/dagger/store.go index 468fc395..9ec8ce7c 100644 --- a/dagger/store.go +++ b/dagger/store.go @@ -46,11 +46,11 @@ func NewStore(root string) (*Store, error) { } func DefaultStore() (*Store, error) { - root := defaultStoreRoot - if r := os.Getenv("DAGGER_STORE"); r != "" { - root = r + if root := os.Getenv("DAGGER_STORE"); root != "" { + return NewStore(root) } - return NewStore(root) + + return NewStore(os.ExpandEnv(defaultStoreRoot)) } func (s *Store) deploymentPath(name string) string {