# File lib/capistrano/command.rb, line 37 def process! loop do break unless process_iteration { @channels.any? { |ch| !ch[:closed] } } end logger.trace "command finished" if logger if (failed = @channels.select { |ch| ch[:status] != 0 }).any? hosts = failed.map { |ch| ch[:server] } error = CommandError.new("command #{command.inspect} failed on #{hosts.join(',')}") error.hosts = hosts raise error end self end