I noticed that dagger.Container Stdout() method returns an error string that contains stderr and stdout, if the last WithExec command fails.
(defined here: https://github.com/dagger/dagger/blob/6dac0951b62d85b48316c1194b468898b11c2199/core/gateway.go#L201)
I would like to apply custom logic in that case:
- Print the actual command stdout to stdout
- Print stderr to stderr
- Exit if exitCode != 1.
The motivation is to use dagger as vim makeprg for quickfix errors. (https://vimdoc.sourceforge.net/htmldoc/quickfix.html)
I need a clean stdout for that...
Is there a way (other than parsing the error string) to achieve that?