-
-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Description
Would you be willing to add a Remove-Variable paramStopPSFFunction after Stop-PSFFunction but before return to _ErrorScript on these classes? This is my guess as to why this variable pops up in my global scope.
psframework/library/PSFramework/Commands/InvokePSFProtectedCommand.cs
Lines 167 to 208 in 02dbf37
| private string _ErrorScript = @" | |
| param ( | |
| $__PSFramework__Message, | |
| $__PSFramework__Exception, | |
| $__PSFramework__Target, | |
| $__PSFramework__Continue, | |
| $__PSFramework__ContinueLabel, | |
| $__PSFramework__FunctionName, | |
| $__PSFramework__ModuleName, | |
| $__PSFramework__File, | |
| $__PSFramework__Line, | |
| $__PSFramework__Cmdlet, | |
| $__PSFramework__EnableException | |
| ) | |
| $paramStopPSFFunction = @{ | |
| Message = $__PSFramework__Message | |
| Exception = $__PSFramework__Exception | |
| Target = $__PSFramework__Target | |
| Continue = $__PSFramework__Continue | |
| FunctionName = $__PSFramework__FunctionName | |
| ModuleName = $__PSFramework__ModuleName | |
| File = $__PSFramework__File | |
| Line = $__PSFramework__Line | |
| Cmdlet = $__PSFramework__Cmdlet | |
| EnableException = $__PSFramework__EnableException | |
| StepsUpward = 1 | |
| } | |
| if ($__PSFramework__ContinueLabel) { $paramStopPSFFunction['ContinueLabel'] = $__PSFramework__ContinueLabel } | |
| Stop-PSFFunction @paramStopPSFFunction | |
| return | |
| "; |
psframework/library/PSFramework/Commands/InvokePSFCallbackCommand.cs
Lines 48 to 80 in 02dbf37
| private string _ErrorScript = @" | |
| param ( | |
| $__PSFramework__Message, | |
| $__PSFramework__Exception, | |
| $__PSFramework__FunctionName, | |
| $__PSFramework__ModuleName, | |
| $__PSFramework__File, | |
| $__PSFramework__Line, | |
| $__PSFramework__Cmdlet, | |
| $__PSFramework__EnableException | |
| ) | |
| $paramStopPSFFunction = @{ | |
| Message = $__PSFramework__Message | |
| Exception = $__PSFramework__Exception | |
| FunctionName = $__PSFramework__FunctionName | |
| ModuleName = $__PSFramework__ModuleName | |
| File = $__PSFramework__File | |
| Line = $__PSFramework__Line | |
| Cmdlet = $__PSFramework__Cmdlet | |
| EnableException = $__PSFramework__EnableException | |
| StepsUpward = 1 | |
| } | |
| Stop-PSFFunction @paramStopPSFFunction | |
| return | |
| "; |