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

Fix Rake-style task arguments for bin/rails #47676

Merged

Conversation

jonathanhefner
Copy link
Member

Follow-up to #47208.

When using Rake-style CLI arguments, Rake::Application#top_level_tasks will return the full task invocation rather than the parsed task name. For example, when running rake foo[bar] baz[qux], top_level_tasks will return ["foo[bar]", "baz[qux]"] rather than ["foo", "baz"]. Therefore, we must extract the task name before checking existence.

Follow-up to rails#47208.

When using Rake-style CLI arguments, `Rake::Application#top_level_tasks`
will return the full task invocation rather than the parsed task name.
For example, when running `rake foo[bar] baz[qux]`, `top_level_tasks`
will return `["foo[bar]", "baz[qux]"]` rather than `["foo", "baz"]`.
Therefore, we must extract the task name before checking existence.
@rails-bot rails-bot bot added the railties label Mar 14, 2023
@jonathanhefner jonathanhefner merged commit bed48e6 into rails:main Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant