Skip to content

Commit

Permalink
Display Survey url in Resolve-AzError
Browse files Browse the repository at this point in the history
issue: #11021
  • Loading branch information
msJinLei committed Feb 7, 2020
1 parent 821b03f commit ceac5a3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Accounts/Accounts/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Display AzurePowershell survey url to Resolve-Error.

## Version 1.7.1
* Disable context auto saving when AzureRmContext.json not available
Expand Down
2 changes: 2 additions & 0 deletions src/Accounts/Accounts/Common/AzureProfileConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ namespace Microsoft.Azure.Commands.Profile.Common
public static class AzureProfileConstants
{
public const string AzureAutosaveVariable = "Azure_Profile_Autosave";

public const string AzureSurveyUrl = "https://aka.ms/azpssurvey";
}
}
4 changes: 4 additions & 0 deletions src/Accounts/Accounts/Errors/ResolveError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
using System.Linq;
using System.Management.Automation;
using Microsoft.Azure.Commands.Common.Authentication.Abstractions;
using Microsoft.Azure.Commands.Profile.Common;
using Microsoft.Azure.Commands.Profile.Properties;
using System.Collections;
using Microsoft.Azure.Commands.ResourceManager.Common;
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
Expand Down Expand Up @@ -79,6 +81,8 @@ public override void ExecuteCmdlet()
HandleError(record);
}
}
var message = string.Format(Resources.AzurePowerShellFeedback, AzureProfileConstants.AzureSurveyUrl);
Console.WriteLine(message);
}

private IEnumerable<ErrorRecord> GetErrorVariable()
Expand Down
9 changes: 9 additions & 0 deletions src/Accounts/Accounts/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/Accounts/Accounts/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -471,4 +471,7 @@
<data name="ProfileFileNotAccessible" xml:space="preserve">
<value>Fail to access profile file and will try to use process ContextAutosaveSetting mode. Detailed error: '{0}'</value>
</data>
<data name="AzurePowerShellFeedback" xml:space="preserve">
<value>The Azure PowerShell team is listening, please let us know how we are doing: {0}.</value>
</data>
</root>

0 comments on commit ceac5a3

Please sign in to comment.