Skip to content

. #280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 30, 2015
Merged

. #280

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class NewAzureStorageContext : AzureDataCmdlet
/// </summary>
private const string AnonymousEnvironmentParameterSet = "AnonymousAccountEnvironment";

private const string StorageAccountNameHelpMessage = "Azure Storage Acccount Name";
private const string StorageAccountNameHelpMessage = "Azure Storage Account Name";
[Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage,
Mandatory = true, ParameterSetName = AccountNameKeyParameterSet)]
[Parameter(Position = 0, HelpMessage = StorageAccountNameHelpMessage,
Expand Down Expand Up @@ -283,7 +283,7 @@ internal CloudStorageAccount GetAnonymousStorageAccountFromAzureEnvironment(stri
/// <summary>
/// Get storage account and use specific end point
/// </summary>
/// <param name="credential">Storage credentail</param>
/// <param name="credential">Storage credential</param>
/// <param name="storageAccountName">Storage account name, it's used for build end point</param>
/// <param name="useHttps"></param>
/// <param name="endPoint"></param>
Expand Down Expand Up @@ -350,6 +350,19 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
}
}

if(null == azureEnvironment)
{
try
{
var profileClient = new ProfileClient(new AzureSMProfile());
azureEnvironment = profileClient.GetEnvironmentOrDefault(azureEnvironmentName);
}
catch(ArgumentException e)
{
throw new ArgumentException(e.Message + " " + string.Format(CultureInfo.CurrentCulture, Resources.ValidEnvironmentName, EnvironmentName.AzureCloud, EnvironmentName.AzureChinaCloud));
}
}

}

if (null != azureEnvironment)
Expand Down