Permalink
Browse files

Use Thor's self.exit_on_failure? to exit whenever accessing the gener…

…ators from the CLI and a Thor::Error is raised.
  • Loading branch information...
1 parent 36f570d commit dcc72b207922faba896eb9560a7186a90223cb8b @parndt parndt committed with josevalim Jan 29, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 railties/lib/rails/commands/application.rb
@@ -15,4 +15,16 @@
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

0 comments on commit dcc72b2

Please sign in to comment.