79585[BUGFIX] Do not return exit codes > 255
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
- Jochen Roth +1
- Markus Klein +1
- Stefan Bürk +1
- Susi Moog +1
-
Verified V +2 Done
- Andreas Kienast +2
- Jochen Roth +1
- Markus Klein +1
- Stefan Bürk +1
- Susi Moog +1
- core-ci +1 CI
Issues 1
Files 1
Review log 1517
-
Andreas Kienast uploaded patch set 1 07/03/23, 10:31
-
Markus Klein commented on patch set 2 07/03/23, 10:32
Published edit on patch set 1. -
Markus Klein commented on patch set 2 V +1 CR +1 07/03/23, 10:33
I added a comment explaining the condition -
Susi Moog voted on patch set 2 V +1 CR +1 07/03/23, 10:33
-
Mathias Brodala commented on patch set 1 07/03/23, 10:33
CommandApplication.php:113IMO this should at least trigger another error message. Otherwise this is silently skipped and makes debugging harder. -
Andreas Kienast commented on patch set 2 07/03/23, 10:35
CommandApplication.php:113ReplyI'm replicating Symfony behavior here, please see https://github.com/symfony/console/blob/6.3/Application.php#L207-L213. -
Stefan Bürk voted on patch set 2 V +1 CR +1 07/03/23, 10:37
-
Mathias Brodala commented on patch set 2 07/03/23, 10:37
CommandApplication.php:113ReplyAdded here: https://github.com/symfony/console/commit/a60cde753cc946f88325b4c13dd53ca0a490c42c Still I'd prefer doing it better than Symfony here. -
core-ci voted on patch set 1 V +1 07/03/23, 10:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43209
-
core-ci voted on patch set 2 V +1 07/03/23, 10:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43210
-
Andreas Kienast commented on patch set 2 07/03/23, 10:42
CommandApplication.php:113ReplyHow should that look like? A new message in the console that the thrown exception code was converted to 255? I think I'd -1 this. -
Mathias Brodala commented on patch set 2 07/03/23, 10:44
CommandApplication.php:113ReplyAlmost. An error message that a return code > 255 was detected including the return code and that it is normalized to 255. That's enough information to trace back the behavior. At least I'd be very glad for these details. -
Jochen Roth voted on patch set 2 V +1 CR +1 07/03/23, 10:45
-
Susi Moog commented on patch set 2 07/03/23, 10:45
CommandApplication.php:113ReplyIn this case, I would not even expect to get the exitCode from the exception as bash exception code. The core (non-symfony) cli exception handler hardcodes this to one in this case. I think it's totally fine to use 255 here for exceptions (that are not otherwise handled). In which case do you think this makes thinks harder? -
Mathias Brodala commented on patch set 2 07/03/23, 10:51
CommandApplication.php:113ReplyMostly in case someone (semi-)intentionally uses codes > 255 and wonders why his command does not exit with that code. But you are right, right now this is silently normalized to 0, silently normalizing this to 255 is already and improvement. -
Andreas Kienast voted on patch set 2 V +2 CR +2 07/03/23, 10:58
-
Andreas Kienast merged patch set 3 07/03/23, 10:58