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/commands
Jonathan Hefner 68a3f679d9 Support reentrant calls to RakeCommand.perform
Rake stores the current top-level task and arguments in global state.
Invoking another top-level task within the same process requires
overwriting this state.  Doing so indiscriminately can cause incorrect
behavior, such as infinitely repeating the original task.  In
particular, this is a problem when running one task from another via
`rails_command "...", inline: true`.

The solution is to save and restore the global state in each call to
`RakeCommand.perform` using the `Rake.with_application` method.

Fixes #39128.
2020-05-03 19:28:15 -05:00
..
application [Railties] require_relative => require 2017-10-21 22:48:26 +09:00
console Add config.disable_sandbox option to Rails console 2019-03-23 19:31:03 +09:00
credentials remove reference to global rails command and replace with bin/rails 2019-12-27 19:32:37 +00:00
db/system/change Change commands to not depend on ARGV 2020-02-18 14:08:59 -06:00
dbconsole Deprecate spec_name and use name for configurations 2020-02-24 13:27:07 -05:00
destroy [Railties] require_relative => require 2017-10-21 22:48:26 +09:00
dev Help command for visible commands should be hidden 2019-04-19 00:33:12 -07:00
encrypted remove reference to global rails command and replace with bin/rails 2019-12-27 19:32:37 +00:00
generate Fix rails new --dev 2020-02-16 00:44:37 -06:00
help Use say/error instead of puts/$stderr.puts 2018-08-22 22:39:03 +03:00
initializers Add -e/--environment option to rails initializers 2019-03-16 10:02:06 +09:00
new Use say/error instead of puts/$stderr.puts 2018-08-22 22:39:03 +03:00
notes Adds register_tags 2019-04-12 08:55:42 +02:00
plugin Use say/error instead of puts/$stderr.puts 2018-08-22 22:39:03 +03:00
rake Support reentrant calls to RakeCommand.perform 2020-05-03 19:28:15 -05:00
routes Rely on Rails::Command's help output. 2018-03-13 20:56:37 +01:00
runner Properly expand the environment's name in all commands 2019-03-15 07:43:10 +09:00
secrets remove reference to global rails command and replace with bin/rails 2019-12-27 19:32:37 +00:00
server Add falcon to the available rack servers 2020-01-20 19:12:31 +01:00
test Change commands to not depend on ARGV 2020-02-18 14:08:59 -06:00
version Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00