Просмотр исходного кода

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

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
i-c-b 2 лет назад
Родитель
Сommit
5eb8554331
2 измененных файлов с 14 добавлено и 6 удалено
  1. 5 0
      .changes/cli-apple-dev-team.md
  2. 9 6
      tooling/cli/src/info/ios.rs

+ 5 - 0
.changes/cli-apple-dev-team.md

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

+ 9 - 6
tooling/cli/src/info/ios.rs

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