Skip to content

Commit cab1dcb

Browse files
author
Kapil Borle
authored
Fix NRE in Get-ScriptAnalyzerRule command (#691)
1 parent fcd9a4e commit cab1dcb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Engine/Commands/GetScriptAnalyzerRuleCommand.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,16 @@ public string[] Severity
8989
/// </summary>
9090
protected override void BeginProcessing()
9191
{
92+
93+
// Initialize helper
94+
Helper.Instance = new Helper(
95+
SessionState.InvokeCommand,
96+
this);
97+
Helper.Instance.Initialize();
98+
9299
string[] rulePaths = Helper.ProcessCustomRulePaths(customRulePath,
93100
this.SessionState, recurseCustomRulePath);
94-
ScriptAnalyzer.Instance.Initialize(this, rulePaths, null, null, null, null == rulePaths ? true : false);
101+
ScriptAnalyzer.Instance.Initialize(this, rulePaths, null, null, null, null == rulePaths ? true : false);
95102
}
96103

97104
/// <summary>

0 commit comments

Comments
 (0)