Is it possible to abort on errors or call another task when a command fails?
This doesn't work:
@task('migrate', ['on' => 'web'])
cd {{ $currentReleaseDir }};
php artisan migrate || exit 1;
@endtask
It fails with the message (I know I can run --force
, it's just a way to make the command fail for testing):
**************************************
* Application In Production! *
**************************************
But then it proceeds to run the rest of the deploy script.