This commit is contained in:
Raúl Kripalani 2021-07-29 14:36:04 +01:00 committed by Jennifer Wang
parent b3c951c924
commit 4b6fa79ea2
2 changed files with 5 additions and 4 deletions

View File

@ -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)
}

View File

@ -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)