Chris, That's triggered by the posix return code of, in this case pkill or your conditional statement. I suggest adding something like a `&& true`; so it alwasy returns a `sucess` code.
- Lee On 17 April 2010 10:52, Christopher Opena <[email protected]> wrote: > Hello all, I'm doing some experimentation on using pkill inside of > Capistrano to kill multiple processes at once. I'm performing the pkill > inside of a bash (sudo "if [cond]; then pkill #{process} fi") conditional. > For troubleshooting's sake, I'm making sure the [cond] prints out the > output. No problems there, the if [cond] finds and prints out the process > and pkill actually does kill the process when it's found, but then > Capistrano exits out with a: > > command finished > command "pkill #{process}" failed on #{server_name} > > Has anyone experienced a problem like this before? > > I even tried pulling the sudo bash command out of Capistrano and into a > bash script and then having Capistrano run the script (sudo > "/path/to/script"), and it runs it successfully and I see the task getting > killed, but the Cap exists with: > > command finished > command "sudo /path/to/script" failed on #{server_name} > > Anyone have any ideas? This one is really strange, and I'm a bit stumped. > Although it's successful in the end, it makes it hard to place the task in > the middle of a long string of tasks because it exits out and doesn't > continue :/ > > Thanks in advance, > -Chris. > > -- > * 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]<capistrano%[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 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
