It is because capistrano cannot tell when a script is just waiting for
soemthing to finish, or when it is waiting for input. If you have a
script that needs interaction, you need to capture it's output and
look for the prompt(s) you expect, and then reprompt on the local box,
and send the output back to the server:
run "something that prompts" do |channel, stream, data|
if data =~ /Are you really sure/
puts "Are you really sure?"
response = gets
channel.send_data(response)
else
Capistrano::Configuration.default_io_proc[channel, stream, data]
end
end
If it is the standard deploy:migrate task that you need this kind of
response-handling in, you'll need to reimplement the deploy:migrate
task in your config/deploy.rb (e.g., copy, paste, and tweak).
- Jamis
On Oct 24, 2008, at 8:50 AM, johne wrote:
>
> We have a global rake task that prompts "Are you really sure?" when
> running any rake task in production environment. But capistrano does
> not seem to work with Readline. For example when deploying and cap
> is trying to run rake db:migrate we get the prompt, but it does not
> respect the input, it just hangs.
>
> Any ideas?
>
> >
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---