# File lib/capistrano/configuration/execution.rb, line 39 def transaction raise ArgumentError, "expected a block" unless block_given? raise ScriptError, "transaction must be called from within a task" if task_call_frames.empty? return yield if transaction? logger.info "transaction: start" begin @rollback_requests = [] yield logger.info "transaction: commit" rescue Object => e rollback! raise ensure @rollback_requests = nil end end