Is it possible to abort errors or cause another task if the command fails?
This does not work:
@task('migrate', ['on' => 'web'])
cd {{ $currentReleaseDir }};
php artisan migrate || exit 1;
@endtask
It does not work with the message (I know that I can run it --force, this is just a way to make the command unsuccessful for testing):
**************************************
* Application In Production! *
**************************************
But then it runs the rest of the deployment script.
source
share