Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support reentrant calls to RakeCommand.perform #39137

Merged
merged 1 commit into from
May 4, 2020

Commits on May 4, 2020

  1. 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 rails#39128.
    jonathanhefner committed May 4, 2020
    Configuration menu
    Copy the full SHA
    68a3f67 View commit details
    Browse the repository at this point in the history