You can do that for any Capistrano variable. Just set the variable to
be a Proc (or attach a block to the set command directly) and that
proc will be evaluated the first time the variable is requested.
It's really one of the most-powerful-but-little-known features of Capistrano.
- Jamis
On 8/7/07, Jon <[EMAIL PROTECTED]> wrote:
>
> On Aug 7, 12:20 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> > Yup, it's this line:
> >
> > set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
> >
> > By referencing current_path in the value for that variable, you are
> > forcing Capistrano to evaluate the current_path, based on what it
> > knows about the deploy_to variable. Capistrano will then cache the
> > value of current_path, so even if you change deploy_to later, it won't
> > reset automatically.
> >
> > What you really want is to use a lazily evaluated value for mongrel_conf:
> >
> > set(:mongrel_conf) { "#{current_path}/config/mongrel_cluster.yml" }
> >
> > That way, mongrel_conf won't be evaluated until the first time it is
> > needed, which means current_path won't be evaluated until that time
> > either.
>
> Ah, neat. I hope I can do that for deploy_to as well.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---