Skip to content

Use separate buffers for stdout and stderr on executing git-lfs-authenticate #718

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

Merged
merged 1 commit into from
Oct 19, 2015

Conversation

bozaro
Copy link
Contributor

@bozaro bozaro commented Oct 8, 2015

It's fix authentication issue on ssh error messages like:

X11 forwarding request failed

…nticate

It's fix authentication issue on ssh error messages like:
```
X11 forwarding request failed
```
@rubyist
Copy link
Contributor

rubyist commented Oct 8, 2015

This looks reasonable to me 👍

// Save stdout and stderr in separate buffers
var outbuf, errbuf bytes.Buffer
cmd.Stdout = &outbuf
cmd.Stderr = &errbuf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that strictly allowed? I thought the only supported way was to read from cmd.StdErrPipe() and cmd.StdOutPipe()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, I see it's OK before Start(). I've just never seen that approach before, useful :) [Edit]Got that from reading the golang code, it's a totally valid approach, if not one that's really shown in golang docs/examples.

@sinbad
Copy link
Contributor

sinbad commented Oct 9, 2015

👍

technoweenie added a commit that referenced this pull request Oct 19, 2015
Use separate buffers for stdout and stderr on executing git-lfs-authenticate
@technoweenie technoweenie merged commit 5b1915e into git-lfs:master Oct 19, 2015
@technoweenie technoweenie mentioned this pull request Oct 19, 2015
20 tasks
@technoweenie
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

4 participants