You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to rails#47208.
`UnrecognizedCommandError` calls `printing_commands` to make "Did you
mean?" suggestions. `printing_commands` calls `RakeCommand::rake_tasks`,
which loads the Rake tasks if they have not been memoized. If the tasks
have already been loaded by `RakeCommand::perform` (but not memoized by
`RakeCommand::rake_tasks`), then the tasks will be loaded a second time.
This can cause, for example, constant redefinition warnings if the task
files define constants.
Therefore, this commit memoizes the tasks from `RakeCommand::perform`
before raising `UnrecognizedCommandError`.
0 commit comments