fix(cli): Apple Dev Teams format for info::Section::Display (#7282)

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
This commit is contained in:
i-c-b 2023-06-24 06:30:34 -05:00 committed by GitHub
parent 38d0bed8eb
commit 5eb8554331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

View File

@ -0,0 +1,5 @@
---
'tauri-cli': 'patch:bug'
---
Fix `tauri info` failing when there is no available iOS code signing certificate.

View File

@ -12,13 +12,16 @@ pub fn items() -> Vec<SectionItem> {
let teams = tauri_mobile::apple::teams::find_development_teams().unwrap_or_default();
Some((
if teams.is_empty() {
"None".red().to_string()
"Developer Teams: None".red().to_string()
} else {
teams
.iter()
.map(|t| format!("{} (ID: {})", t.name, t.id))
.collect::<Vec<String>>()
.join(", ")
format!(
"Developer Teams: {}",
teams
.iter()
.map(|t| format!("{} (ID: {})", t.name, t.id))
.collect::<Vec<String>>()
.join(", ")
)
},
Status::Neutral,
))