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.
11 lines
340 B
Ruby
11 lines
340 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "rails/command"
|
|
require "active_support/deprecation"
|
|
|
|
namespace :dev do
|
|
task cache: :environment do
|
|
ActiveSupport::Deprecation.warn("Using `bin/rake dev:cache` is deprecated and will be removed in Rails 6.1. Use `bin/rails dev:cache` instead.\n")
|
|
Rails::Command.invoke "dev:cache"
|
|
end
|
|
end
|