Forum: Ruby Abort Rake Task

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A0599814ceddc2e283792f4e47c57f5e?d=identicon&s=25 brian.takita (Guest)
on 2005-11-13 23:14
(Received via mailing list)
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
This topic is locked and can not be replied to.