Yor follow up invocations are using variables set to empty strings, you missed 
the leading colon to make them symbols. 

> On Mar 31, 2014, at 6:32 AM, gonace <[email protected]> wrote:
> 
> One task with multiple "ask()" not triggering it more then once
> 
>   task :confirmation do
>     if fetch(:stage) == :production then
>       puts <<-WARN
> 
>       ========================================================================
> 
>       WARNING: You're about to perform actions on production server(s)
>       Please confirm that all your intentions are kind and friendly
> 
>       ========================================================================
> 
>       WARN
> 
>       ask(:answer, ' Are you sure you want to continue? (Y) ')
>       if fetch(:answer) == 'Y' then
>         set :confirmed, true
>       end
> 
>       unless fetch(:confirmed)
>         puts "\nDeploy cancelled!"
>         exit
>       end
>     end
> 
> 
>     if fetch(:stage) != :test then
>       puts <<-WARN
> 
>       ========================================================================
> 
>       GATEWAY: You're about to perform actions on a server(s)
>       that need you to provide gateway credentials.
> 
>       ========================================================================
> 
>       WARN
> 
>       gateway_username = ''
>       gateway_password = ''
> 
>       ask(gateway_username, ' Username: ')
>       ask(gateway_password, ' Password: ')
>     end
>   end
>   before :starting, :confirmation
> 
> 
> I want to ask the user for gateway credentials (username and password) but 
> also warn about entering a task sequence to a production environment.
> 
> But only the first "ask()" is triggered, no question about username or 
> password is asked the user.
> -- 
> 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].
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/capistrano/b5c9010b-c059-4380-9418-0b42e323ea67%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/AB21C50B-51BA-4901-AD64-44962C6F24C9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to