Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit dcc72b207922faba896eb9560a7186a90223cb8b 1 parent 36f570d
@parndt parndt authored josevalim committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 railties/lib/rails/commands/application.rb
View
12 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
Please sign in to comment.
Something went wrong with that request. Please try again.