Skip to content

Commit feaeacb

Browse files
authored
Check whether myinvocation.mycommand.version exists in AzurePSCmdlet (#272)
* remove-checkinteractive * add comments * remove unused method * check whether mycommand existed for AzurePSCmdlet * check whether my command version exists
1 parent a4a557f commit feaeacb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/AzurePSCmdlet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ protected override void BeginProcessing()
379379
/// </summary>
380380
protected override void EndProcessing()
381381
{
382-
if (this.MyInvocation?.MyCommand != null && SurveyHelper.GetInstance().ShouldPropmtSurvey(this.MyInvocation.MyCommand.ModuleName, this.MyInvocation.MyCommand.Version))
382+
if (this.MyInvocation?.MyCommand?.Version != null && SurveyHelper.GetInstance().ShouldPropmtSurvey(this.MyInvocation.MyCommand.ModuleName, this.MyInvocation.MyCommand.Version))
383383
{
384384
WriteSurvey();
385385
if (_qosEvent != null)

0 commit comments

Comments
 (0)