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
Collect both stdout and stderr in mage/sh #356
base: master
Are you sure you want to change the base?
Conversation
sh.BothOutput and sh.BothOutputWith follows existing naming conventions.
@DavidGamba (sorry, I can't find the comment in the UI, only e-mail!?) CombinedOutput returns stdout and stderr in one stream, here we're returning them as separate streams. There isn't precedent in either os/exec or this package so I thought "BothOutput" but not wedded to it, of course. |
@coryrc I sent that message before reading the code more in depth and that is why I deleted it afterwards, I realized it made no sense since the use case is different. |
@DavidGamba Thought I was losing it! Hey, since you're here, what do you think of |
Adding a *V version to What is your use case here? I haven't found many cases where capturing stderr out of context within stdout is what I want and I would love to know how you plan to use this. |
As part of CI tests I can popup errors to the user why it stopped. Stdout can have too much context and just Stderr is often enough to figure out what went wrong without having to page through a lot of output. Without live streaming, you don't get any error message if the process is terminated due to timeout, which makes diagnosing hangs a real pain. Also an annoying user experience running locally, because it's hard to know if something is hung or slow. |
@coryrc any further thoughts on the issues you've identified? |
No. I just used said functions in my own library, it worked fine. I haven't used it for a while though. |
Aaaah fair enough. |
sh.BothOutput and sh.BothOutputWith
follows existing naming conventions.