add RepoType#String; adjust repo parsing logic.

This commit is contained in:
Raúl Kripalani 2021-07-29 13:49:47 +01:00 committed by Jennifer Wang
parent a94ab050bf
commit 3733fa9cc2

View File

@ -124,7 +124,9 @@ func GetAPIInfo(ctx *cli.Context, t repo.RepoType) (APIInfo, error) {
repoFlags := flagsForRepo(t) repoFlags := flagsForRepo(t)
for _, f := range repoFlags { for _, f := range repoFlags {
if !ctx.IsSet(f) { // cannot use ctx.IsSet because it ignores default values
f := ctx.String(f)
if f == "" {
continue continue
} }