diff options
author | Philip Arndt <parndt@gmail.com> | 2011-01-29 10:59:29 +0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-01-29 16:51:39 +0800 |
commit | dcc72b207922faba896eb9560a7186a90223cb8b (patch) | |
tree | b34ae3c3452f8eb99e4a9813c4778a07d7a57619 | |
parent | 36f570dbd230d34c24f8e56310224af0cdf9e5cf (diff) | |
download | rails-dcc72b207922faba896eb9560a7186a90223cb8b.tar.gz rails-dcc72b207922faba896eb9560a7186a90223cb8b.tar.bz2 rails-dcc72b207922faba896eb9560a7186a90223cb8b.zip |
Use Thor's self.exit_on_failure? to exit whenever accessing the generators from the CLI and a Thor::Error is raised.
-rw-r--r-- | railties/lib/rails/commands/application.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/application.rb b/railties/lib/rails/commands/application.rb index 47c6752ca3..3b57b925ba 100644 --- a/railties/lib/rails/commands/application.rb +++ b/railties/lib/rails/commands/application.rb @@ -15,4 +15,16 @@ require 'rubygems' if ARGV.include?("--dev") require 'rails/generators' require 'rails/generators/rails/app/app_generator' +module Rails + module Generators + class AppGenerator + # We want to exit on failure to be kind to other libraries + # This is only when accessing via CLI + def self.exit_on_failure? + true + end + end + end +end + Rails::Generators::AppGenerator.start |