Method: Utilities#display_result
- Defined in:
- lib/utilities.rb
#display_result(cmd_result) ⇒ Object
Takes the command result from run command and build a pretty display
Attributes
-
cmd_result- the command result hash
Returns
-
formatted text
175 176 177 178 179 180 |
# File 'lib/utilities.rb', line 175 def display_result(cmd_result) result = "Process: #{cmd_result["pid"]}\nSTDOUT:\n#{cmd_result["stdout"]}\n" result = "STDERR:\n #{cmd_result["stderr"]}\n#{result}" if cmd_result["stderr"].length > 2 result += "#{EXIT_CODE_FAILURE} Command returned: #{cmd_result["status"]}" if cmd_result["status"] != 0 result end |