Hi,

So in this example, I'd like to (at the least) make the
"--password=It5A53cr3t" go away:

localhost:~/project-x me$ cap deploy
  * executing `deploy'
  * executing `deploy:before_update'
SVN User: user-abc
Password:
  * executing `deploy:setup'
  * executing "mkdir -p /usr/local/projects/project-x
/usr/local/projects/project-x/releases /usr/local/projects/project-x/shared
/usr/local/projects/project-x/shared/system"
    servers: ["some-domain.com"]
Password:
    [some-domain.com] executing command
    command finished
  * executing "umask 002"
    servers: ["some-domain.com"]
    [some-domain.com] executing command
    command finished
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
  * executing "svn export -q  -r1168 --username user-abc --password
It5A53cr3t 
https://subversion.some-domain.com/repos/project-x/trunk//usr/local/projects/project-x/releases/20070627152315
&& (echo 1168 >
/usr/local/projects/project-x/releases/20070627152315/REVISION)"
    servers: ["some-domain.com"]
    [some-domain.com] executing command

Matt





On 6/27/07, Jamis Buck <[EMAIL PROTECTED]> wrote:
>
>
> Perhaps I'm misunderstanding how you are using this. Are you using
> "cap shell" and then executing commands from the interactive prompt,
> or do you mean something else? Can you send an example transcript
> where the username/password are showing up?
>
> - Jamis
>
> On 6/27/07, Matt M. <[EMAIL PROTECTED]> wrote:
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to