[Rake-devel] Rake and --directory option
hgs at dmu.ac.uk
Wed Jan 30 10:34:00 EST 2008
On Wed, 30 Jan 2008, Jim Weirich wrote:
> On Jan 30, 2008, at 9:41 AM, Hugh Sasse wrote:
> > You might want to keep the rakefile outside to [...] 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.
It could scream loudly at you before doing so. I agree that it should
not be a default, and that your present choice is rarely not what
> 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.
OK. Then I suppose one case against the idea is that it will add another
branch to many tests to give good coverage.
Maybe this is a "fix it in the docs" case? :-) I wonder what Andrea
thinks about that.
More information about the Rake-devel