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

Git errors and regular output start appearing as red error records #404

Closed
rkeithhill opened this issue Feb 7, 2017 · 9 comments
Closed
Labels

Comments

@rkeithhill
Copy link
Collaborator

System Details

  • posh-git version: 0.7.0
  • PowerShell version: 5.1.14393.693
  • git version 2.10.0.windows.1
  • OS: Microsoft Windows NT 10.0.14393.0

Issue Description

This is what I see after a while:

259:49ms> git checkout master
Your branch is behind 'origin/master' by 66 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
git : Switched to branch 'master'
At line:1 char:1
+ git checkout master
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Switched to branch 'master':String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

If I close and restart a new PowerShell console this problem goes away, at least for a while. Not sure what is triggering it to start acting differently.

@rkeithhill rkeithhill added the Bug label Feb 7, 2017
@dahlbyk
Copy link
Owner

dahlbyk commented Feb 7, 2017

Fascinating...I have never seen this. So a valid/successful git checkout master is now reporting itself as being error-full?

@rkeithhill
Copy link
Collaborator Author

Yes but it seems to take a while - like when I have a console running for days. Closing and restarting the console fixes it ... for a while.

@dahlbyk
Copy link
Owner

dahlbyk commented Feb 7, 2017

What do you see in $Errors and the module's private $invokeErrors when this occurs?

@rkeithhill
Copy link
Collaborator Author

$invokeErrors was empty and $errors contained only a few records corresponding to the git errors I saw previously. I did try to checkout a branch that didn't exist. I believe that generated the first error.

@rkeithhill
Copy link
Collaborator Author

@lzybkr Do you know of any scenarios where calling an application (like git.exe) starts generating error records for both stdout & stderr output in the PowerShell console?

@lzybkr
Copy link
Collaborator

lzybkr commented Feb 9, 2017

Sorry - I don't think I've seen that behavior before.

@rkeithhill
Copy link
Collaborator Author

Yeah, it's really kind of weird, not easy to repro and probably going to be hard to debug. Lucky me. :-)

@rkeithhill
Copy link
Collaborator Author

rkeithhill commented Feb 10, 2017

@lzybkr @daviwil I can repro this by using the PowerShell extension's new ability to attach to PowerShell host processes. After disconnecting I notice that git stdout is incorrectly getting routed to stderr.

@dahlbyk I believe this is corner case enough that it shouldn't hold up 0.7.0. In fact, it is very likely there is nothing posh-git can do about this.

@dahlbyk
Copy link
Owner

dahlbyk commented Feb 10, 2017

I believe this is corner case enough that it shouldn't hold up 0.7.0. In fact, it is very likely there is nothing posh-git can do about this.

👍 Closing until we can confirm this is our fault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants