mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fix regexp in generators for right catching error message
This commit is contained in:
@@ -300,7 +300,7 @@ module Rails
|
||||
rescue LoadError => e
|
||||
raise unless e.message =~ /#{Regexp.escape(path)}$/
|
||||
rescue NameError => e
|
||||
raise unless e.message =~ /Rails::Generator([\s(::)]|$)/
|
||||
raise unless e.message =~ /Rails::Generator(\s|::|$)/
|
||||
warn "[WARNING] Could not load generator #{path.inspect} because it's a Rails 2.x generator, which is not supported anymore. Error: #{e.message}.\n#{e.backtrace.join("\n")}"
|
||||
rescue Exception => e
|
||||
warn "[WARNING] Could not load generator #{path.inspect}. Error: #{e.message}.\n#{e.backtrace.join("\n")}"
|
||||
|
||||
Reference in New Issue
Block a user