lib/simple_deploy/stack/ssh.rb in simple_deploy-0.6.7 vs lib/simple_deploy/stack/ssh.rb in simple_deploy-0.7.0

- old
+ new

@@ -18,10 +18,25 @@ end def execute(args) return false if @instances.nil? || @instances.empty? create_execute_task args - @task.execute + + status = false + + begin + @task.execute + status = true + @logger.info "Command executed against instances successfully." + rescue ::Capistrano::CommandError => error + @logger.error "Error running execute statement: #{error}" + rescue ::Capistrano::ConnectionError => error + @logger.error "Error connecting to instances: #{error}" + rescue ::Capistrano::Error => error + @logger.error "Error: #{error}" + end + + status end private def create_execute_task(args)