testcontainers-node icon indicating copy to clipboard operation
testcontainers-node copied to clipboard

stderr output

Open jeronimo-planet opened this issue 1 year ago • 1 comments

When we do an exec, we get an { ouput, exitCode }. It would be nice if we could get a { stdout, stderr, exitCode }. Do you guys think it's possible?

jeronimo-planet avatar Oct 07 '24 16:10 jeronimo-planet

This is the result type in tc-java, so that would be a quite alinged implementation:

class ExecResult {
    int exitCode;
    String stdout;
    String stderr;
}

kiview avatar Oct 08 '24 07:10 kiview

PR welcome. I'd suggest keeping the existing output field, and adding the stdout/stderr fields. Otherwise we lose the ability to log the output in time order. Removing the output would also be a breaking change.

cristianrgreco avatar Nov 15 '24 10:11 cristianrgreco

This will be released shortly

cristianrgreco avatar Nov 26 '24 10:11 cristianrgreco