From 70bf990294d199dbfff62cb679ebfa7284b96f2e Mon Sep 17 00:00:00 2001 From: vyzo Date: Thu, 12 May 2022 16:21:29 +0300 Subject: [PATCH] LOTUS_PATH is the canonical way to get the repo path --- chain/actors/manifest.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/chain/actors/manifest.go b/chain/actors/manifest.go index 210680285..966167fe0 100644 --- a/chain/actors/manifest.go +++ b/chain/actors/manifest.go @@ -178,14 +178,13 @@ func FetchAndLoadBundles(ctx context.Context, bs blockstore.Blockstore, bar map[ netw = v } - // TODO: how to get the repo properly? - path, err := homedir.Expand("~/.lotus") - if err != nil { - return err - } - - if p := os.Getenv("LOTUS_PATH"); p != "" { - path = p + path := os.Getenv("LOTUS_PATH") + if path == "" { + var err error + path, err = homedir.Expand("~/.lotus") + if err != nil { + return err + } } for av, rel := range bar {