Andrea Fazzi
12/7/2006 8:06:00 AM
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
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