Gerhardus Geldenhuis wrote:
> Hi
> Is there a way to run different tasks based on the exit status of a
> run command? Also how can I "force" a task to fail or succeed, how is
> the failure/success of a task determined/defined.
>
> Regards
>   
You can write a task with :on_error set to :continue and then catch the 
exception, I never done it, the idea is:
  task :foo, :on_error => :continue do
    begin
      run "important task"
    rescue Exception => error
      puts "Important task fail!!: #{error}"
      foo.task_if_foo_fail
    end
  end


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

begin:vcard
fn;quoted-printable:Rafael Garc=C3=ADa Ortega
n;quoted-printable:Garc=C3=ADa Ortega;Rafael
org:ASPgems S.L.
email;internet:[email protected]
tel;work:692686533
x-mozilla-html:FALSE
url:http://www.aspgems.com
version:2.1
end:vcard

Reply via email to