Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cab1dcb

Browse files
author
Kapil Borle
authoredJan 18, 2017
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)
Please sign in to comment.