I have a number of file tasks in my Rakefile which look like
file 'task1' => 'dep' do
sh "some command"
end
There's also
task :start => :next
task :last => :dep2
I was wondering if there was a way of rescuing it on the top level, i.e. to say
begin
task :last => :dep2
rescue
# do something
end
rather than in every file
task do
file 'task1' => 'dep' do
begin
sh "some command"
rescue
# do something
end
end
Is it possible?