Hey thanks Jamis, unfortunately that doesn't seem to work. What do you recommend I do if I don't want the username and password to appear when the command gets executed?
Matt On 6/27/07, Jamis Buck <[EMAIL PROTECTED]> wrote: > > > You can do something like > > require 'capistrano/shell' > class Capistrano::Shell > def exec_command(...) > # your implementation here > end > end > > You _might_ be able to put that in your deploy.rb, and have it "just > work". I haven't actually tried that, though. > > - Jamis > > On 6/26/07, Matt M. <[EMAIL PROTECTED]> wrote: > > I see. I realized that as soon as I pressed to "submit" button! How do > you > > override a method outside of the class though? > > > > Matt > > > > > > On 6/26/07, Jamis Buck <[EMAIL PROTECTED]> wrote: > > > > > > Note that the Capistrano::Shell.run method is not the same as > > > Capistrano::Configuration::Actions::Invocation#run > > method. Your > > > definition is resulting in an infinite recursive loop. What you need > > > to do is reimplement the Capistrano::Shell#exec_command method, to > > > extend the callback used there. > > > > > > - Jamis > > > > > > On 6/26/07, goodieboy <[EMAIL PROTECTED]> wrote: > > > > > > > > Hi, > > > > > > > > I'd like to override the Capistrano.Shell.run method. The reason is > > > > that when I do an update, the shell displays the username and > > > > password. I'd like to test the command data by doing something like: > > > > > > > > def run cmd > > > > self.run cmd do |channel,stream,data| > > > > if cmd =~ /\-\-password=/ > > > > # do nothing... > > > > end > > > > end > > > > end > > > > > > > > I tried that and got: > > > > ./config/deploy.rb:41:in `run': stack level too deep > > > > (SystemStackError) > > > > > > > > Any ideas? > > > > > > > > Thanks! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
