Skip to content

Commit 473f58f

Browse files
author
Hovsep
committed
Merge pull request Azure#1658 from hovsepm/clu
[#111665302] Fix bad warning message.
2 parents e216de3 + 5a1048d commit 473f58f

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

src/CLU/Commands.ResourceManager.Cmdlets/Extensions/ResourceExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ internal static PSResourceObject ToPSResourceObject(this Resource<JToken> resour
6262
psObject.SubscriptionId = string.IsNullOrEmpty(resource.Id) ? null : ResourceIdUtility.GetSubscriptionId(resource.Id);
6363
psObject.Tags = TagsHelper.GetTagsHashtables(resource.Tags);
6464

65-
6665
var objectProperties = objectDefinition.Where(kvp => kvp.Value != null).SelectManyArray(kvp => new[] { kvp.Key, kvp.Value });
6766

6867
for(int i=0; i< objectProperties.Length; i+=2)

src/CLU/Microsoft.Azure.Commands.Profile/Models/RMProfileClient.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,7 @@ private bool TryGetTenantSubscription(IAccessToken accessToken,
513513
if (subscriptions.Any())
514514
{
515515
WriteWarningMessage(string.Format(
516-
"TenantId '{0}' contains more than one subscription. First one will be selected for further use. " +
517-
"To select another subscription, use Set-AzureRmContext.",
516+
Resources.TooManyTenants,
518517
tenantId));
519518
}
520519
subscriptionFromServer = subscriptions.First();

src/CLU/Microsoft.Azure.Commands.Profile/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CLU/Microsoft.Azure.Commands.Profile/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@
186186
<data name="TenantIdNotFound" xml:space="preserve">
187187
<value>Unable to find tenant '{0}'.</value>
188188
</data>
189+
<data name="TooManyTenants" xml:space="preserve">
190+
<value>TenantId '{0}' contains more than one subscription. First one will be selected for further use. To select another subscription, use 'context set' cmdlet.</value>
191+
</data>
189192
<data name="TypeNotAccessToken" xml:space="preserve">
190193
<value>To create an access token credential, you must provide an access token account.</value>
191194
</data>

0 commit comments

Comments
 (0)