Skip to content
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

Closed
gerane opened this issue Mar 20, 2017 · 4 comments
Labels
Issue-Bug A bug to squash.
Milestone

Comments

@gerane
Copy link
Contributor

gerane commented Mar 20, 2017

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

2017-03-20_12-40-49

Another example using vsce to publish an extension.

errorsterminal

And here is an example when using git status

2017-03-20_12-43-13

Here are the logs from the vsce command. This is how they have looked for these.

https://gist.github.com/gerane/6e8f221cfa6789fb6b191917bdb3cca1

@daviwil daviwil added this to the 0.11.0 milestone Mar 20, 2017
@daviwil daviwil added the Issue-Bug A bug to squash. label Mar 20, 2017
@rkeithhill
Copy link
Contributor

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

@daviwil
Copy link
Contributor

daviwil commented Mar 20, 2017

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?

@rkeithhill
Copy link
Contributor

rkeithhill commented Mar 20, 2017

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.

@daviwil
Copy link
Contributor

daviwil commented Sep 7, 2017

See this comment for possible fix: PowerShell/vscode-powershell#972 (comment)

daviwil added a commit to daviwil/PowerShellEditorServices that referenced this issue Oct 26, 2017
daviwil added a commit to daviwil/PowerShellEditorServices that referenced this issue Oct 27, 2017
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this issue Feb 26, 2019
…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.
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this issue Feb 26, 2019
Fix PowerShell#396: Extension commands loaded in profile are not being registered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash.
Projects
None yet
Development

No branches or pull requests

3 participants