Skip to content

Commit

Permalink
Merge pull request #1622 from hovsepm/release-1.1.0
Browse files Browse the repository at this point in the history
Fixed Storage issue in NewAzureStorageContext.cs
  • Loading branch information
Hovsep committed Jan 11, 2016
2 parents 95c6d74 + 2437b6e commit 704dead
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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)
Expand Down

0 comments on commit 704dead

Please sign in to comment.