[Rake-devel] Rake and --directory option

Jim Weirich jim.weirich at gmail.com
Wed Jan 30 10:12:52 EST 2008


On Jan 30, 2008, at 9:41 AM, Hugh Sasse wrote:

> You might want to keep the rakefile outside to work for work on a
> directory that regularly gets messed up.  And Ruby has a -C option,
> so for the same reasons as that.

Perhaps.  But Rake has always guaranteed that the run directory is  
the location of the Rakefile, allowing Rakefiles to take advantage of  
that assumption.  I hesitate to introduce an option that will give  
the illusion of working with arbitrary Rakefiles, but which will in  
fact break most of them.

If a Rakefile is written *expecting* to be run from a different  
directory, that's OK.  But if a Rakefile is written to expect a  
different directory, it can easily be written to change the directory  
itself.  And since current versions of Rake allow easy parameter  
passing from the command line, I think I would rather see it done  
through the rakefile rather a rake command line option.

-- 
-- Jim Weirich
-- jim.weirich at gmail.com






More information about the Rake-devel mailing list