Open alexislefebvre opened 6 years ago
It is possible to do this, but it already is questionable to buffer the stderr as it is. That is, if there is a substantial amount of stdout from an application (which is more typically expected than a lot of stderr output) then you'l start running out of memory for tracking the output for several tasks that have a lot of output.
That being said, it is certainly possible and there are some simple steps that can be taken to capturing "just enough" output (such as a circular buffer like this: https://github.com/armon/circbuf). We could add options for capturing either or both stdout and stderr on failure:
tasks:
- name: phpqa
parallel-tasks:
- name: PHPStan
cmd: ...
stderr-on-failure: false
stdout-on-failure: true
or globally for all tasks:
config:
stderr-on-failure: false
stdout-on-failure: true
tasks:
- name: phpqa
parallel-tasks:
- name: PHPStan
cmd: ...
Here is my script:
Here is the output:
There's no output.
I add
1>&2
to the end of the command.Here is the output:
I have to use
1>&2
because the command outputs result onstdout
instead ofstderr
.Is it possible to display
stdout
instead ofstrerr
id a command fails? Could it be configurable for each command?