# "--directory" patch

**URL:** <https://www.ruby-forum.com/t/directory-patch/78613>\
**Category:** Ruby\
**Created:** [December 7, 2006, 9:07am UTC](https://www.ruby-forum.com/t/directory-patch/78613 "2006-12-07T09:07:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gendag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/f04885/32.png) [@gendag](https://www.ruby-forum.com/u/gendag)\
**Post date:** [December 7, 2006, 9:07am UTC](https://www.ruby-forum.com/t/directory-patch/78613/1 "2006-12-07T09:07:46Z")

</div>

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
