You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for combined stdout and stderr output #3496
There's many times you want to get both the stdout and stderr. It's slightly tedious to do this with the Go SDK since you have to grab them both separately (and check err, etc.). Maybe there could just be a field Output that grabs both for you at the same time?
What can make this better is being able to select sibling fields in the same query since you'd execute only once. This ties into the explicit execution feedback.
@helderco The problem with fetching separate fields is you lose the interleaving, i.e. what a human would actually see if they ran the command themselves. I think that's the root ask of this issue.
Implementation wise this might be a little tricky since we currently direct stdout/stderr to separate files. We could have the shim duplex to both separate streams and a combined one, it'll just add a bit of overhead. Probably not a huge deal.
Activity
sipsma commentedon Oct 26, 2022
To be clear, the first part of this issue is deciding if we actually want it. If so, the implementation should be straightforward I think.
helderco commentedon Oct 27, 2022
Yes I think this makes a lot of sense. Problem is, you still need to specify the fields, no?
So it still makes two queries:
What can make this better is being able to select sibling fields in the same query since you'd execute only once. This ties into the explicit execution feedback.
vito commentedon Oct 28, 2022
@helderco The problem with fetching separate fields is you lose the interleaving, i.e. what a human would actually see if they ran the command themselves. I think that's the root ask of this issue.
Implementation wise this might be a little tricky since we currently direct stdout/stderr to separate files. We could have the shim duplex to both separate streams and a combined one, it'll just add a bit of overhead. Probably not a huge deal.
helderco commentedon Oct 28, 2022
I see, so you mean having 3 fields:
feat: add ability to combine outputs in WithExec
feat: add ability to combine outputs in WithExec
feat: add ability to combine outputs in WithExec
feat: add ability to combine outputs in WithExec (#10924)