Problem
I have something like this:
task :fail do
exit 111
end
task :run_fail_and_succeed do
begin
Rake::Task['knapsack:fail'].invoke
rescue
exit 0
end
end
I would like to run task :fail
and handle it's exit status. Than exit with 0
. How can I do that?
Notes:
- It can't be asynchronous / parallel / run in a background.
:fail
must finish before:run_fail_and_succeed
. - It would be nice not only to exit with 0, but really handle this status code, so I could do different things based on it's value