-
Notifications
You must be signed in to change notification settings - Fork 522
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.ls_remote fails when stderr isn't empty #516
Comments
A friendly reminder that this issue had no activity for 60 days. |
3 tasks
3 tasks
3 tasks
Fixed with #684 and released in git-2.0.0-pre1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subject of the issue
When the output of
ls-remote
command is parsed both stout and stderr parsed, what causes the script to fail because of the unexpected git command output.Your environment
Expected behaviour
Git.ls_remote working even if something fails into stderr.
Output to stderr parsed separately from stdout.
IDK how complicated is it, but why not switch
Open3::popen3
as command runner?Steps to reproduce
You should have output in stderr for your git command. Then
Git.ls_remote
will fail.Actual behaviour
When running Git.ls_remote and stderr isn't empty, the parsing of ls-remote command will fail because warning in the output causes:
The reason is that git commands on this host for some reason output warnings about hostkey everytime. And I still searching for the reasons, why
~/.ssh/known_hosts
file in the home is ignored, but I believe that this kind of warnings shouldn't fail program execution.When I running my script, I'm getting:
Which then not splitted by the tabs because there are no tabs in this string
ruby-git/lib/git/lib.rb
Line 501 in e2fd4af
I checked the output of the command manually with and without stderr redirection to the /dev/null. as we can see with suppressed stderr script will not fail.
P.S.: Also wondering why ls_remote doesn't support listing tags, but that's another issue.
The text was updated successfully, but these errors were encountered: