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

Method needed to get rake command line options for spawning new rake job #263

Open
derekney opened this issue Mar 21, 2018 · 1 comment
Open

Comments

@derekney
Copy link

I am implementing a "top level" Rakefile that will spawn off rake jobs in sub-directories.
This is not hard to do, except that I want to pass the same options to the jobs that was passed to the original rake command. I cannot find a way to reliably find out what those options were without using some quasi private methods such as handle_options in the application object. I do not want the targets, just the options.

Could we add code to handle_options to put the options that are parsed into an array that is a public attribute of the application object?

Then I could grab the rake options by a simple use of something like:

Rake.application.rake_options

If there is some way to easily do this that I am missing please let me know. I originally was just iterating over the ARGV entries and grabbing things out of it, but quickly realized that the command line options may or may not have an argument following a "-" prefixed option and there is no way I can know that without duplicating all the code in standard_rake_options.

Thanks.

@rozaimq

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants