-
Notifications
You must be signed in to change notification settings - Fork 223
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
Add UseNullPSHostUI
config so apps hosting PSES can disable it
#2122
Add UseNullPSHostUI
config so apps hosting PSES can disable it
#2122
Conversation
src/PowerShellEditorServices/Services/Analysis/PssaCmdletAnalysisEngine.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like quite a bit of this but would want to clean it up a bit, put it through some thorough testing, and I think you are quite right that we should condition this based on named pipes instead of adding (yet another) parameter to the startup script. Let me know if you want to do some of that, and please tell me about the best way to go about testing this!
Sweet, I'll go ahead and make that change |
46df818
to
e1e3bf2
Compare
This is going to be hard to test since it appears that all the tests use Stdio, unless I’m mistaken. |
454c03a
to
b4d3f53
Compare
UseNullPSHostUI
config so apps hosting PSES can disable it
b4d3f53
to
25da731
Compare
25da731
to
e272230
Compare
That CI failure was a red herring, it was actually caused by GitHub Actions giving us a mix of PowerShell versions leading to a missed bug in a unit test, fixed by #2135 |
Even if they're using stdio.
e272230
to
6ebadcc
Compare
PR Summary
Meaningful output from PSES's internal PowerShell is suppressed if you don't specify -EnableConsoleRepl.
PR Context
I'd like to be able to see the output from PSScriptAnalyzer but my application has a read-only terminal.
This SwitchParameter prevents the UI from being set to NullPSHostUI without enabling Repl functionality.
Perhaps a better way to implement this would be to condition off the use of named pipes as I believe the intention of the following code is to prevent clobbering stdio since ConsoleRepl can only be used when connecting via named pipes.