Please sign in to comment.
bug #28545 [Console] Send the right exit code to console.terminate li…
…steners (mpdude) This PR was squashed before being merged into the 2.8 branch (closes #28545). Discussion ---------- [Console] Send the right exit code to console.terminate listeners | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | When a Console command throws an exception without a status code, `Application::run()` takes care of setting the exit code to `1` when the exception does not provide a code itself. This happens slightly too late, as `console.terminate` event listeners that are called from within `Application::doRunCommand()` are given the plain exeception code, before this conversion. The result is that `console.*` event listeners that you might be using to log exit code e. g. for cron jobs will see a `0` code instead of the real value used to terminate the script. ***Todo:*** - [x] Make sure we've got tests covering this, i. e. do not mock out `doRunCommand()`. Commits ------- b90a3f1 [Console] Send the right exit code to console.terminate listeners
- Loading branch information...
Showing with 75 additions and 10 deletions.