Abort Rake Task

B

Brian Takita

Hello,

I have a rake task named setup, that depends on a file task that
creates a yml file that has the path to ruby on the system. I would
like setup to abort if the file is created and tell the user to edit
the yml file to the actual ruby path.

So far, the only way I can think of to do it is using the exit method.

However I get the following message:
$ rake setup
(in /cygdrive/c/dev/ruby/project)
property 'svn:ignore' set on '.'
Please edit the ruby_env.yml file with the path to ruby on your system.
Then run 'rake setup' again.
rake aborted!
exit
../rakefile:37:in `exit'

However, the last three lines look like an error and would probably be
confusing to the user.

Is there a more elegant way to do this in rake?

Thank you,
Brian Takita
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,607
Members
45,240
Latest member
pashute

Latest Threads

Top