bugfix.
This commit is contained in:
parent
3733fa9cc2
commit
23cd561f2e
@ -78,7 +78,7 @@ func EnvsForRepo(t repo.RepoType) (current []string, deprecated []string) {
|
|||||||
return []string{"WORKER_API_INFO"}, nil
|
return []string{"WORKER_API_INFO"}, nil
|
||||||
case repo.Markets:
|
case repo.Markets:
|
||||||
// support split markets-miner and monolith deployments.
|
// 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:
|
default:
|
||||||
panic(fmt.Sprintf("Unknown repo type: %v", t))
|
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)
|
repoFlags := flagsForRepo(t)
|
||||||
for _, f := range repoFlags {
|
for _, f := range repoFlags {
|
||||||
// cannot use ctx.IsSet because it ignores default values
|
// cannot use ctx.IsSet because it ignores default values
|
||||||
f := ctx.String(f)
|
path := ctx.String(f)
|
||||||
if f == "" {
|
if path == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
p, err := homedir.Expand(ctx.String(f))
|
p, err := homedir.Expand(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return APIInfo{}, xerrors.Errorf("could not expand home dir (%s): %w", f, err)
|
return APIInfo{}, xerrors.Errorf("could not expand home dir (%s): %w", f, err)
|
||||||
}
|
}
|
||||||
|
@ -386,6 +386,7 @@ func handleMarketsInfo(ctx context.Context, nodeApi api.StorageMiner) error {
|
|||||||
return sorted[i].status > sorted[j].status
|
return sorted[i].status > sorted[j].status
|
||||||
})
|
})
|
||||||
|
|
||||||
|
fmt.Println()
|
||||||
fmt.Printf("Storage Deals: %d, %s\n", total.count, types.SizeStr(types.NewInt(total.bytes)))
|
fmt.Printf("Storage Deals: %d, %s\n", total.count, types.SizeStr(types.NewInt(total.bytes)))
|
||||||
|
|
||||||
tw := tabwriter.NewWriter(os.Stdout, 1, 1, 1, ' ', 0)
|
tw := tabwriter.NewWriter(os.Stdout, 1, 1, 1, ' ', 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user