Skip to content

Commit ee5f1bc

Browse files
committed
don't show homepage or license in pretty display if it is none
1 parent b1af501 commit ee5f1bc

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/commands/all.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,16 @@ fn simplify_and_display_json(json: Value) {
6868
println!("REPOSITORY URLS");
6969
println!(" {:<14}: {}", "HTML URL", html_url);
7070
println!(" {:<14}: {}", "Clone URL", clone_url);
71-
println!(" {:<14}: {}", "Homepage", homepage);
71+
if homepage != &"" && homepage != &"None" {
72+
println!(" {:<14}: {}", "Homepage", homepage);
73+
}
7274
println!();
7375
println!("DEVELOPMENT DETAILS");
7476
println!(" {:<14}: {}", "Language", language);
7577
println!(" {:<14}: {}", "Default branch", default_branch);
76-
println!(" {:<14}: {}", "License", license);
78+
if license != &"None" {
79+
println!(" {:<14}: {}", "License", license);
80+
}
7781
println!();
7882
println!("IMPORTANT DATES");
7983
println!(" {:<14}: {}", "Created at", pretty_dates(created_at));

0 commit comments

Comments
 (0)