Skip to content

Commit 7fa659d

Browse files
author
Kapil Borle
committed
Move helper initialization to format method
1 parent fac7632 commit 7fa659d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Engine/Commands/InvokeFormatterCommand.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ protected override void BeginProcessing()
6666
}
6767
#endif
6868

69-
Helper.Instance = new Helper(SessionState.InvokeCommand, this);
70-
Helper.Instance.Initialize();
71-
7269
try
7370
{
7471
inputSettings = PSSASettings.Create(Settings, null, this);

Engine/Formatter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ public static string Format<TCmdlet>(
1515
Settings inputSettings,
1616
TCmdlet cmdlet) where TCmdlet : PSCmdlet, IOutputWriter
1717
{
18+
Helper.Instance = new Helper(cmdlet.SessionState.InvokeCommand, cmdlet);
19+
Helper.Instance.Initialize();
20+
1821
var ruleOrder = new string[]
1922
{
2023
"PSPlaceCloseBrace",

0 commit comments

Comments
 (0)