Exception: Sprinkle::Errors::RemoteCommandFailure

Inherits:
PrettyFailure show all
Defined in:
lib/sprinkle/errors/remote_command_failure.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from PrettyFailure

#details

Instance Method Summary collapse

Methods inherited from PrettyFailure

#boxed, #initialize, #log

Constructor Details

This class inherits a constructor from Sprinkle::Errors::PrettyFailure

Instance Method Details


6
7
8
9
10
11
12
13
14
15
# File 'lib/sprinkle/errors/remote_command_failure.rb', line 6

def print_summary
  summary
  log "Command", @details[:command]
  # capistrano returns this
  log "Hosts", @details[:hosts] if @details[:hosts]
  # ssh actor returns error and stdout outputs
  log "STDERR", @details[:error] unless @details[:error].blank?
  log "STDOUT", @details[:stdout] unless @details[:stdout].blank?
  log "Actor error message", @details[:message] if @details[:message]
end

#summaryObject


17
18
19
# File 'lib/sprinkle/errors/remote_command_failure.rb', line 17

def summary
  boxed("Package '#{@installer.package.name}' returned error code #{@details[:code]}.")
end