Skip to content

Commit 7738ff9

Browse files
committed
Fix New-AzureDeployment cmdlet
1 parent 0e27fbd commit 7738ff9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement/HostedServices/NewAzureDeployment.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System;
1717
using System.Management.Automation;
1818
using System.Net;
19-
using Microsoft.Azure.Common.Authentication.Models;
19+
using System.Text.RegularExpressions;
2020
using Microsoft.WindowsAzure.Commands.Common;
2121
using Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions;
2222
using Microsoft.WindowsAzure.Commands.ServiceManagement.Helpers;
@@ -114,7 +114,10 @@ public virtual void NewPaaSDeploymentProcess()
114114
AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Production);
115115
AssertNoPersistenVmRoleExistsInDeployment(PVM.DeploymentSlotType.Staging);
116116

117-
var storageName = Profile.Context.Subscription.GetStorageAccountName();
117+
var storageAccount = Profile.Context.Subscription.GetStorageAccountName();
118+
var regex = new Regex(@";AccountName=([a-zA-Z0-9]{0,})");
119+
var match = regex.Match(storageAccount);
120+
string storageName = match.Groups[1].Value;
118121

119122
Uri packageUrl;
120123
if (this.Package.StartsWith(Uri.UriSchemeHttp, StringComparison.OrdinalIgnoreCase) ||

0 commit comments

Comments
 (0)