Skip to content

Commit 508682b

Browse files
author
Hovsep
committed
Merge pull request #1887 from hovsepm/release-1.2.2
[Release-1.2.2] Fixed null reff exception in Select-AzureSubscription cmdlet
2 parents 067b696 + 6c71bda commit 508682b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ServiceManagement/Profile/Commands.Profile/Subscription/SelectAzureSubscription.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ private string GetAccount()
140140
}
141141

142142
AzureSubscription subscription = ProfileClient.Profile.Subscriptions.Values
143+
.Where(s => !string.IsNullOrWhiteSpace(s.Name))
143144
.FirstOrDefault(s => s.Name.Equals(SubscriptionName, StringComparison.InvariantCultureIgnoreCase) ||
144145
s.Id.ToString().Equals(SubscriptionId, StringComparison.InvariantCultureIgnoreCase));
145146

0 commit comments

Comments
 (0)