laravel / tinker

Powerful REPL for the Laravel framework.
https://laravel.com/docs/artisan#tinker
MIT License
7.32k stars 130 forks source link

[3.x] Return correct exit code on exceptions #165

Closed LachlanArthur closed 1 year ago

LachlanArthur commented 1 year ago

This PR modifies the behaviour of the --execute option to have it return an exit code of 1 when an exception is thrown.

Currently all exceptions are caught and rendered by Psysh internally, which makes it difficult to determine whether the command succeeded.

Original PR Reopened on master branch as per https://github.com/laravel/tinker/pull/163#issuecomment-1628516836