mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fb3642b0ca
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.
9 lines
326 B
Ruby
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
|