Method: TTY::Command::Printers::Pretty#print_command_exit
- Defined in:
- lib/tty/command/printers/pretty.rb
#print_command_exit(cmd, status, runtime, *args) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/tty/command/printers/pretty.rb', line 30 def print_command_exit(cmd, status, runtime, *args) if cmd.only_output_on_error && !status.zero? output << out_data output << err_data end runtime = TIME_FORMAT % [runtime, pluralize(runtime, "second")] = ["Finished in #{runtime}"] << " with exit status #{status}" if status << " (#{success_or_failure(status)})" write(cmd, .join) end |