mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use Thor's self.exit_on_failure? to exit whenever accessing the generators from the CLI and a Thor::Error is raised.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user