lib/sprinkle/actors/local.rb in sprinkle-0.5.1.1 vs lib/sprinkle/actors/local.rb in sprinkle-0.5.2

- old
+ new

@@ -22,10 +22,13 @@ def servers_for_role? true end + def sudo?; false; end + def sudo_command; nil; end + def install(installer, roles, opts = {}) #:nodoc: # all local installer cares about is the commands @installer = installer process(installer.package.name, installer.install_sequence, roles) rescue LocalCommandError => e @@ -33,27 +36,29 @@ ensure @installer = nil end def verify(verifier, roles, opts = {}) #:nodoc: - process(verifier.package.name, verifier.commands, roles, :suppress_and_return_failures => true) + process(verifier.package.name, verifier.commands, roles) + true + rescue LocalCommandError + false end protected def process(name, commands, roles, opts = {}) #:nodoc: @log_recorder = Sprinkle::Utility::LogRecorder.new commands.each do |command| if command == :RECONNECT - return true + res = 0 elsif command == :TRANSFER res = transfer(@installer.sourcepath, @installer.destination, roles, :recursive => @installer.options[:recursive]) - raise LocalCommandError if res != 0 else res = run_command command - raise LocalCommandError if res != 0 and not opts[:suppress_and_return_failures] end + raise LocalCommandError if res != 0 end return true end def run_command(cmd)