Merge pull request #252 from dagger/fix-store-root

store: fix root directory
This commit is contained in:
Andrea Luzzardi 2021-04-01 22:24:57 -07:00 committed by GitHub
commit 4c93f100a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,13 +46,13 @@ 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 != "" {
root = r
}
return NewStore(root) return NewStore(root)
} }
return NewStore(os.ExpandEnv(defaultStoreRoot))
}
func (s *Store) deploymentPath(name string) string { func (s *Store) deploymentPath(name string) string {
return path.Join(s.root, name, "deployment.json") return path.Join(s.root, name, "deployment.json")
} }