James Britt wrote:
> I'm increasingly using rake files for common system tasks.  Since Rake 
> will search up a directory tree until it finds a Rakefile, I can have 
> one in my home directory and call tasks from anyplace below that.
> 
> But tasks that need to know something about the current directory have 
> me stymied.  Calling Dir.pwd in a task reflects the directory of the 
> Rakefile.
> 
> Is there a rake method that returns the path of  where the Rakefile 
> search began?
> 
> 
> E.g., if I'm in /home/james/foo/bar, and the nearest Rakefile is in 
> /home/james, with task :whereami, and I call
> 
>  $ rake whereami
> 
> what does :whereami have to do to return '/home/james/foo/bar' ?

No idea. One possible solution is to put a "stub" rakefile in the dir, 
and the stub requires the main rakefile. Then (IIRC) the pwd during the 
rake tasks will be that of the stub. But maybe you don't want to scatter 
stubs all over the place.

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407