-
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
PSES is adding errors into Integrated Terminal when exe\cmd scripts are executed #396
Comments
Certain exe's have a habit of tweaking the console mode. PowerShell/PowerShell#1177 PS Core has supposedly started to always restore the console mode after invoking an exe (better double check that with @lzybkr). But for <= v5, you have to do that yourself. We found this with posh-git and use this code to reset the console mode: https://github.com/dahlbyk/posh-git/blob/develop/src/ConsoleMode.ps1 |
Thanks Keith! I can't get the other Keith's repro to work for this on PS 5.1, have you found another way to repro the issue? |
Hmm, not yet. Although I have seen this issue on and off with git.exe starting to generate error records (NativeCommandError) in PowerShell.exe while testing posh-git. dahlbyk/posh-git#404 We never did figure this out. We closed it "assuming" it wasn't a posh-git issue. I noticed it more in the PowerShell.exe sessions that I had debugged in via Attach. |
See this comment for possible fix: PowerShell/vscode-powershell#972 (comment) |
…g registered This change fixes an issue caused by the recent extension code refactoring which prevents extension commands from being registered in the extension when loaded in the user's profile. This was caused by the LanguageClient not being given to the ExtensionCommandsFeature early enough for it to register its handler for the extensionCommandAdded event from the language server.
Fix PowerShell#396: Extension commands loaded in profile are not being registered
When executing external commands like git.exe, vsce.cmd, and similar. Also noticed it will error if I run help using pscx and it is using more.com for pagination. When the command finished an error is added to the output.
Example:
help commandname -full
Another example using vsce to publish an extension.
And here is an example when using git status
Here are the logs from the vsce command. This is how they have looked for these.
https://gist.github.com/gerane/6e8f221cfa6789fb6b191917bdb3cca1
The text was updated successfully, but these errors were encountered: