From d78e6a5cb839b290824da92bfb28841e98a727e2 Mon Sep 17 00:00:00 2001 From: Kapil Borle Date: Tue, 17 Jan 2017 18:23:43 -0800 Subject: [PATCH] Fix NRE in Get-ScriptAnalyzerRule command --- Engine/Commands/GetScriptAnalyzerRuleCommand.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Engine/Commands/GetScriptAnalyzerRuleCommand.cs b/Engine/Commands/GetScriptAnalyzerRuleCommand.cs index 2ec09a2c8..a0a669b98 100644 --- a/Engine/Commands/GetScriptAnalyzerRuleCommand.cs +++ b/Engine/Commands/GetScriptAnalyzerRuleCommand.cs @@ -89,9 +89,16 @@ public string[] Severity /// protected override void BeginProcessing() { + + // Initialize helper + Helper.Instance = new Helper( + SessionState.InvokeCommand, + this); + Helper.Instance.Initialize(); + string[] rulePaths = Helper.ProcessCustomRulePaths(customRulePath, this.SessionState, recurseCustomRulePath); - ScriptAnalyzer.Instance.Initialize(this, rulePaths, null, null, null, null == rulePaths ? true : false); + ScriptAnalyzer.Instance.Initialize(this, rulePaths, null, null, null, null == rulePaths ? true : false); } ///