Skip to content

Commit f3fcdb8

Browse files
committed
Fix issue of cannot create a storage context with azure environment.
1 parent 2fc985b commit f3fcdb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Common/Storage/Commands.Storage/Common/Cmdlet/NewAzureStorageContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
338338
{
339339
AzureEnvironment azureEnvironment = null;
340340

341-
if (null != DefaultContext)
341+
if (null != SMProfile)
342342
{
343343
if (string.IsNullOrEmpty(azureEnvironmentName) )
344344
{
@@ -354,7 +354,7 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
354354
{
355355
try
356356
{
357-
var profileClient = new ProfileClient(new AzureSMProfile());
357+
var profileClient = new ProfileClient(SMProfile);
358358
azureEnvironment = profileClient.GetEnvironmentOrDefault(azureEnvironmentName);
359359
}
360360
catch(ArgumentException e)

0 commit comments

Comments
 (0)