buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <ar...@intalio.com>
Subject Re: project tasks and current-directory
Date Tue, 15 Jul 2008 08:17:41 GMT
On Tue, Jul 15, 2008 at 1:10 AM, Ittay Dror <ittay.dror@gmail.com> wrote:

> Hi,
>
> I'm creating tasks that are sensitive to the current directory. What I see
> is that Dir.pwd is always the directory of buildfile, even when running
> buildr from a subproject directory. Can I make buildr cd to the directory of
> the project before the project tasks are invoked?


Dir.chdir Buildr.application.original_dir do
 ...
end

Make sure to run all your code inside that block, so it can switch back to
the original directory afterwards.

Assaf


>
>
> Thanks,
> Ittay
>
> --
> --
> Ittay Dror <ittay.dror@gmail.com>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message