LOTUS_PATH is the canonical way to get the repo path

This commit is contained in:
vyzo 2022-05-12 16:21:29 +03:00
parent 7b6f109401
commit 70bf990294

View File

@ -178,14 +178,13 @@ func FetchAndLoadBundles(ctx context.Context, bs blockstore.Blockstore, bar map[
netw = v netw = v
} }
// TODO: how to get the repo properly? path := os.Getenv("LOTUS_PATH")
path, err := homedir.Expand("~/.lotus") if path == "" {
var err error
path, err = homedir.Expand("~/.lotus")
if err != nil { if err != nil {
return err return err
} }
if p := os.Getenv("LOTUS_PATH"); p != "" {
path = p
} }
for av, rel := range bar { for av, rel := range bar {