Skip to content

Commit

Permalink
Fixed Storage issue in NewAzureStorageContext.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hovsep Mkrtchyan committed Jan 11, 2016
1 parent d71c471 commit 2437b6e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -338,9 +338,9 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
{
AzureEnvironment azureEnvironment = null;

if (null != DefaultContext)
if (null != SMProfile)
{
if (string.IsNullOrEmpty(azureEnvironmentName) )
if (DefaultContext != null && string.IsNullOrEmpty(azureEnvironmentName))
{
azureEnvironment = DefaultContext.Environment;

@@ -354,7 +354,7 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
{
try
{
var profileClient = new ProfileClient(new AzureSMProfile());
var profileClient = new ProfileClient(SMProfile);
azureEnvironment = profileClient.GetEnvironmentOrDefault(azureEnvironmentName);
}
catch(ArgumentException e)

0 comments on commit 2437b6e

Please sign in to comment.