lib/sprinkle/actors/vlad.rb in sprinkle-0.2.2 vs lib/sprinkle/actors/vlad.rb in sprinkle-0.2.3

- old
+ new

@@ -53,9 +53,22 @@ # Reraise error if we're not suppressing it raise end end + # Sorry, all transfers are recursive + def transfer(name, source, destination, roles, recursive = true, suppress_and_return_failures = false) #:nodoc: + begin + rsync source, destination + return true + rescue ::Vlad::CommandFailedError => e + return false if suppress_and_return_failures + + # Reraise error if we're not suppressing it + raise + end + end + private def task_sym(name) "install_#{name.to_task_name}".to_sym end