On Aug 26, 5:58 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
> You can capture the exit code via the on_request callback:
>
>    ssh.open_channel do |channel|
>      channel.on_request("exit-status") do |ch, data|
>        code = data.read_long
>        puts "finished with exit code: #{code}"
>      end
>    end
>
> The #on_request callback is whenever the server sends a channel-
> request packet to the client, with a type equal to the argument. In  
> this case, you're trapping all "exit-status" channel requests. The  
> data parameter is a Net::SSH::Buffer object containing the request-
> specific data for the request. For exit-status, this will be a single  
> long integer, representing the exit status.
>
> Hope that helps!

Immensely!

Jeff

--~--~---------~--~----~------------~-------~--~----~
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