Skip to content

Commit 77563da

Browse files
committed
Merge pull request Azure#1475 from ticketarena/dev
Get AzureSMProfile instance from provider singleton if base instance property has not been set.
2 parents 6d074f4 + 5b23154 commit 77563da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ServiceManagement/Services/Commands.Utilities/Websites/Common/WebsiteBaseCmdlet.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using Microsoft.WindowsAzure.Commands.Common;
1516
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1617

1718
namespace Microsoft.WindowsAzure.Commands.Utilities.Websites.Common
@@ -26,7 +27,8 @@ public IWebsitesClient WebsitesClient
2627
{
2728
if (websitesClient == null)
2829
{
29-
websitesClient = new WebsitesClient(Profile, Profile.Context.Subscription, WriteDebug);
30+
var profile = Profile ?? AzureSMProfileProvider.Instance.Profile;
31+
websitesClient = new WebsitesClient(profile, profile.Context.Subscription, WriteDebug);
3032
}
3133
return websitesClient;
3234
}

0 commit comments

Comments
 (0)