I didn't give every line of code, just an example of what I'm doing. In the 
overriden code, exit codes do not matter. I can run the command 'false' 
which returns error code 1, and execution still keeps going. Everywhere 
else, it raises fine. For some reason, errors are not raising in overridden 
functions.

On Tuesday, May 31, 2016 at 11:26:33 AM UTC-4, Lee Hambley wrote:
>
> I'm not seeing anything here that does anything that can return an exit 
> status other than 0 (not knowing what `wait_uwsgi.sh` does).
>
> In principle if an `execute()` exits with a non-zero status, it'll raise - 
> see the docs around the `test()` function, it's analog which tolerates 
> errors 
> https://github.com/capistrano/sshkit/blob/master/EXAMPLES.md#make-a-test-or-run-a-command-which-may-fail-without-raising-an-error
>
> Lee Hambley
> http://lee.hambley.name/
> +49 (0) 170 298 5667
>
> On 31 May 2016 at 14:14, Will Platnick <wpla...@gmail.com <javascript:>> 
> wrote:
>
>> Hello,
>> I have a capistrano deploy that I override a task definition in order to 
>> do some custom things, an incomplete example below. My problem is, 
>> capistrano doesn't seem to check for errors when this happens. So, in my 
>> code that does things like reload nginx, if the config is bad and it can't 
>> reload, capistrano continues on like there's no issue. How do I make 
>> capistrano pay attention to the exit codes like it normally does?
>>
>>     Rake::Task["deploy:symlink:release"].clear_actions
>>     namespace :symlink do
>>         desc 'OVERRIIIIIIDE'
>>         task :release do
>>             on roles(:app), in: :sequence do
>>                 # Make /up return a 404
>>                 execute "touch /tmp/disabled || true"
>>                 # Give time for ELB to fail health checks
>>                 execute "sleep 10"
>>                 # Wait for uWSGI to stop processing stragglers
>>                 execute "#{release_path}/lib/wait_uwsgi.sh"
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Capistrano" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to capistrano+...@googlegroups.com <javascript:>.
>> To view this discussion on the web, visit 
>> https://groups.google.com/d/msgid/capistrano/cc78c368-c467-489b-a6f9-3d422cfd0c5d%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/capistrano/cc78c368-c467-489b-a6f9-3d422cfd0c5d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/9970188c-ccbf-4157-bab5-d99b10b28f87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to