Unify account description message in azure gradle plugin, AB#2071915

This commit is contained in:
Flanker-MSFT 2023-06-26 13:45:07 +08:00
Родитель 828f6b842f
Коммит 7e38444362
1 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -106,8 +106,8 @@ public class GradleAuthHelper {
return account;
}
private static void printCredentialDescription(Account account, boolean skipType) {
if (skipType) {
private static void printCredentialDescription(Account account, boolean isInteractiveLogin) {
if (isInteractiveLogin) {
if (CollectionUtils.isNotEmpty(account.getSubscriptions())) {
final List<Subscription> selectedSubscriptions = account.getSelectedSubscriptions();
if (selectedSubscriptions != null && selectedSubscriptions.size() == 1) {
@ -116,13 +116,9 @@ public class GradleAuthHelper {
selectedSubscriptions.get(0).getId()));
}
}
if (StringUtils.isNotEmpty(account.getUsername())) {
AzureMessager.getMessager().info(AzureString.format("Username: %s", account.getUsername()));
}
} else {
AzureMessager.getMessager().info(account.toString());
}
}
private static void promptAzureEnvironment(AzureEnvironment env) {
if (env != null && env != AzureEnvironment.AZURE) {