Re: [capistrano] Capistrano hangs when waiting for user input from pseudo-terminal

223 views
Skip to first unread message

Donovan Bray

unread,
Feb 14, 2013, 11:19:36 AM2/14/13
to capis...@googlegroups.com
If you just want to pass input then you can use a helper like this which provides an answer based on a regex match of the prompt


On Feb 13, 2013, at 4:32 PM, Eddie Du <sj.e...@gmail.com> wrote:

(copied from my stackoverflow question - perhaps people here have an answer :)

I set up a basic config/deploy.rb file with a task:

task :blah do
  run ". ~/blah.sh"
end

And on the server, the blah.sh file just prompts for input:

while true; do
    read -p "Say something: " blah
done

Capistrano connects to my server just fine, and normal commands work as well. When I run cap blahit prompts me for input, but whatever I type, it's not sending back to the server. The output looks like:

  * 2013-02-13 19:12:36 executing `blah'
  * executing ". ~/blah.sh"
    servers: ["192.81.214.76"]
    [192.81.214.76] executing command
 ** [out :: 192.81.214.76] Say something:

And it doesn't respond no matter what I type.

Note I did set default_run_options[:pty] = true

I'm not even sure if this is a problem with my local setup or the server. Any ideas?

--
--
* You received this message because you are subscribed to the Google Groups "Capistrano" group.
* To post to this group, send email to capis...@googlegroups.com
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com 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 capistrano+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages