-
Notifications
You must be signed in to change notification settings - Fork 312
useLocalScope to true so that it works in CLM #1527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @daxian-dbw if this could be backported to 2.0.x I'd really appreciate it. Then I can ship a PowerShell stable extension with ConstrainedLanguage mode support with PSRL. |
@TylerLeonhardt The change is benign, but there is another use of |
@daxian-dbw that code you shared is wrapped in a try/catch. The error is probably swallowed. This change I made is the only change needed to prevent a "classic PSRL exception" from showing up in my console over and over again. |
After my last commit, the history file is "Visual Studio Code Host_history.txt" |
When a script runs from within a nested pipeline, the script will be treated as PSReadLine is invoked directly from within PS extension, whose pipeline thread (default Runspace) runs in So adding |
@daxian-dbw can you get that 2.0.2 version out for me? |
@TylerLeonhardt Will do. I'm currently busy on the .NET CAP work, can it wait till early next week? |
Yeah that's fine |
.AddScript("0")
dot sources the script. Since it's created in C#, the script is considered trusted... You can't dot source trusted scripts into a runspace that is running in ConstrainedLanguage mode otherwise it throws an exception.This allows PSReadLine to be loaded in the PowerShell extension for VS Code when running in ConstrainedLanguage mode.