ConsoleAdditions icon indicating copy to clipboard operation
ConsoleAdditions copied to clipboard

Output errors from batch

Open mussbach opened this issue 3 years ago • 4 comments

When calling processes via batch the output is sometimes swallowed and on error the return type does not reliably be valid. Not sure how to create a minimum reproducer though, but maybe this is enough.

mussbach avatar Jun 14 '22 13:06 mussbach

This is fixed and will be part of the upcoming 0.7 release

eFrane avatar Dec 10 '22 08:12 eFrane

I'm great at referencing the correct issue. 🙈

This one was solved by https://github.com/eFrane/ConsoleAdditions/commit/07e911843b4ff1bb05b68795516187f26e462af2

eFrane avatar Dec 10 '22 18:12 eFrane

Could this be backported to support symfony 5?

mussbach avatar Oct 08 '23 21:10 mussbach

@mussbach It's been a long time coming. According to the tests, the above attached commit backports the result code fixes to symfony/console 6.4. Could you let me know if that is sufficient?

While backporting, I noticed that a secondary angle to this problem might be, that Batch currently only tracks the last encountered exception. The reasoning used to be that on exception - unless the run is silent - the batch-using command should do immediate handling. I can however imagine use cases where the desired behavior is to run (silently) with collecting the exceptions instead of dropping them.

eFrane avatar Jun 29 '24 09:06 eFrane