How do I return early from a rake task?
A Rake task is basically a block. A block, except lambdas, doesn’t support return but you can skip to the next statement using next which in a rake task has the same effect of using return in a method. task :foo do puts “printed” next puts “never printed” end Or you can move the code … Read more