1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/lib/rails/tasks/initializers.rake
yuuji.yaginuma fb3642b0ca Respect config setting when output deprecation notice in rake tasks
The rake tasks which became deprecate now does not load the environment.
Therefore, even if the application specifies the behavior of deprecating,
the message is output to stderr ignoring the specification.

It seems that this is not the expected behavior.
We should respect the setting even in the rake tasks.
2018-09-04 20:06:54 +09:00

9 lines
326 B
Ruby

# frozen_string_literal: true
require "rails/command"
require "active_support/deprecation"
task initializers: :environment do
ActiveSupport::Deprecation.warn("Using `bin/rake initializers` is deprecated and will be removed in Rails 6.1. Use `bin/rails initializers` instead.\n")
Rails::Command.invoke "initializers"
end