Closed LucasArona closed 1 month ago
Add support to change how the scripts are launched (DotSource vs Call operator).
Adds the ExecuteMode property and the corresponding method to either use the DotSource operator or the Call operator when launching scripts.
Related to this PR: https://github.com/PowerShell/vscode-powershell/pull/5036 https://github.com/PowerShell/vscode-powershell/pull/5059
See https://github.com/PowerShell/vscode-powershell/issues/4327
It's not always desirable to alter the current scope, this PR allows the use of the Call operator when launching scripts.
@LucasArona I added a unit test for this too. About to merge if it all passes.
Add support to change how the scripts are launched (DotSource vs Call operator).
PR Summary
Adds the ExecuteMode property and the corresponding method to either use the DotSource operator or the Call operator when launching scripts.
Related to this PR:
https://github.com/PowerShell/vscode-powershell/pull/5036https://github.com/PowerShell/vscode-powershell/pull/5059PR Context
See https://github.com/PowerShell/vscode-powershell/issues/4327
It's not always desirable to alter the current scope, this PR allows the use of the Call operator when launching scripts.