diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-09-01 16:31:15 +0900 |
---|---|---|
committer | Yuji Yaginuma <yuuji.yaginuma@gmail.com> | 2018-09-04 20:06:54 +0900 |
commit | fb3642b0caf42b0554a8fd0672943f4da1643b2c (patch) | |
tree | f82e8de176f593602a44d45fbbf4d85d5ad325c0 /railties/lib/rails/tasks/dev.rake | |
parent | 63c6943131189c902485f725b465b48ebea14b09 (diff) | |
download | rails-fb3642b0caf42b0554a8fd0672943f4da1643b2c.tar.gz rails-fb3642b0caf42b0554a8fd0672943f4da1643b2c.tar.bz2 rails-fb3642b0caf42b0554a8fd0672943f4da1643b2c.zip |
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.
Diffstat (limited to 'railties/lib/rails/tasks/dev.rake')
-rw-r--r-- | railties/lib/rails/tasks/dev.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/dev.rake b/railties/lib/rails/tasks/dev.rake index 8d75965294..716fb6a331 100644 --- a/railties/lib/rails/tasks/dev.rake +++ b/railties/lib/rails/tasks/dev.rake @@ -4,7 +4,7 @@ require "rails/command" require "active_support/deprecation" namespace :dev do - task :cache 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 |