Take the 2-minute tour ×

I am working with a 3rd party rake task that looks like this:

abort("rake aborted!") if ask("Are you sure?", ['y', 'n']) == 'n'

I am trying to write some additional rake tasks to automate this process. Is there any way to surpress this question coming up? Or somehow feed it a y via the command line to make it happy?

I can edit the Rakefile but that is a last resort.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You will be happy to know that there's a unix command called yes. This will give you a constant stream of y which would be what you need.

share|improve this answer
Sometimes you just don't know the right question to ask! Thanks :) –  Brandon Nov 3 '12 at 15:39
You're very welcomed. Also to get no, its yes no. :) –  Benjamin Tan Nov 3 '12 at 15:50
add comment

Your Answer


