Capturing output from programs in bash shell doesn't work #27131
-
I’m trying to process a code coverage file produced by lcov, and trying to pipe the output through some bash commands:
However the output isn’t captured, and this is what is printed instead:
Running the command locally works as expected:
Anybody know how to make this work? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I guess that for some reason (e.g. different version, platform, or build options) the The easiest solution should be to use
|
Beta Was this translation helpful? Give feedback.
-
It’s not obvious, but even processing simple commands like:
Requires using |
Beta Was this translation helpful? Give feedback.
I guess that for some reason (e.g. different version, platform, or build options) the
lcov
version on the runner writes to stderr instead of stdout, so the regular pipe doesn’t capture the output.The easiest solution should be to use
|&
to capture both stdout and stderr: