Looks like you want `capture("env | grep foo_var")`,
https://github.com/capistrano/capistrano/wiki/2.x-DSL-Documentation-Action-Module#inspection-
but it won't do what you expect, it only runs on the first host on
each
"task"This is one of the big drivers behind the re-architecture around Capistrano 3.0. Lee Hambley -- http://lee.hambley.name/ +49 (0) 170 298 5667 On 11 July 2013 18:22, Simone Fumagalli <[email protected]> wrote: > Hello. I'm new to Capistrano > > I'm trying to write my first post task but I've a problem checking if a > var is defined or not. > I've a multistage setup. For the staging environment the variable foo_var > is defined for the prod environment is not. > > Here my task https://gist.github.com/hpatoio/5976877 > > Environment info > > - rvm 1.21.5 (stable) > - ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux] > - Capistrano v2.15.4 > > Ideas ? > > Thanks > > -- > Simone > > -- > -- > * You received this message because you are subscribed to the Google > Groups "Capistrano" group. > * To post to this group, send email to [email protected] > * To unsubscribe from this group, send email to > [email protected] For more options, visit this > group at http://groups.google.com/group/capistrano?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Capistrano" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en --- You received this message because you are subscribed to the Google Groups "Capistrano" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
