[rake] "--directory" patch

A

Andrea Fazzi

--------------000601060407060705040701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi all,

I prepared a patch for lib/rake.rb in order to include a new option in
rake: the '--directory' option ('-D' for short). The '-D' option in rake
is like the '-C' option in make:

-C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing
anything.

I find this option very useful when I want to execute tasks contained in
a Rakefile positioned somewhere in the filesystem, outside the current
rake command execution dir. So I decided to submit this patch to the
rake development mailing list (but I didn't get any answer) and to your
attention. I hope this new option will included in a future release of rake!

Thanks.
Andrea


--------------000601060407060705040701
Content-Type: text/plain;
name="rake.rb.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="rake.rb.patch"

1641a1642,1643
['--directory', '-D', GetoptLong::REQUIRED_ARGUMENT,
"Change to directory DIR before reading the rakefiles or doing anything else."], 1776a1779,1781
when '--directory'
Dir.chdir( File.expand_path(value) )
options.directory = true

--------------000601060407060705040701--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top