From 23cd561f2e51171251e5f9d6bf2231669747dd5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Kripalani?= Date: Thu, 29 Jul 2021 14:36:04 +0100 Subject: [PATCH] bugfix. --- cli/util/api.go | 8 ++++---- cmd/lotus-miner/info.go | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cli/util/api.go b/cli/util/api.go index bf34f4421..766969dfa 100644 --- a/cli/util/api.go +++ b/cli/util/api.go @@ -78,7 +78,7 @@ func EnvsForRepo(t repo.RepoType) (current []string, deprecated []string) { return []string{"WORKER_API_INFO"}, nil case repo.Markets: // support split markets-miner and monolith deployments. - return []string{"MARKETS_API_INFO, MINER_API_INFO"}, nil + return []string{"MARKETS_API_INFO", "MINER_API_INFO"}, nil default: panic(fmt.Sprintf("Unknown repo type: %v", t)) } @@ -125,12 +125,12 @@ func GetAPIInfo(ctx *cli.Context, t repo.RepoType) (APIInfo, error) { repoFlags := flagsForRepo(t) for _, f := range repoFlags { // cannot use ctx.IsSet because it ignores default values - f := ctx.String(f) - if f == "" { + path := ctx.String(f) + if path == "" { continue } - p, err := homedir.Expand(ctx.String(f)) + p, err := homedir.Expand(path) if err != nil { return APIInfo{}, xerrors.Errorf("could not expand home dir (%s): %w", f, err) } diff --git a/cmd/lotus-miner/info.go b/cmd/lotus-miner/info.go index 67f8180b7..f37952057 100644 --- a/cmd/lotus-miner/info.go +++ b/cmd/lotus-miner/info.go @@ -386,6 +386,7 @@ func handleMarketsInfo(ctx context.Context, nodeApi api.StorageMiner) error { return sorted[i].status > sorted[j].status }) + fmt.Println() fmt.Printf("Storage Deals: %d, %s\n", total.count, types.SizeStr(types.NewInt(total.bytes))) tw := tabwriter.NewWriter(os.Stdout, 1, 1, 1, ' ', 0)