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
https://github.com/donnoman/cap-recipes/blob/master/lib/cap_recipes/tasks/utilities.rb#L229 On Feb 13, 2013, at 4:32 PM, Eddie Du <[email protected]> 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 [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.
