The cause message doesn't include the host the error occurred on. Before: ``` $ mrsk deploy Acquiring the deploy lock... Finished all in 0.1 seconds ERROR (SocketError): getaddrinfo: nodename nor servname provided, or not known ``` After: ``` $ mrsk deploy -d staging Acquiring the deploy lock... Finished all in 0.1 seconds ERROR (SocketError): Exception while executing on host server-123: getaddrinfo: nodename nor servname provided, or not known ```
19 lines
426 B
Ruby
Executable File
19 lines
426 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
# Prevent failures from being reported twice.
|
|
Thread.report_on_exception = false
|
|
|
|
require "mrsk"
|
|
|
|
begin
|
|
Mrsk::Cli::Main.start(ARGV)
|
|
rescue SSHKit::Runner::ExecuteError => e
|
|
puts " \e[31mERROR (#{e.cause.class}): #{e.message}\e[0m"
|
|
puts e.cause.backtrace if ENV["VERBOSE"]
|
|
exit 1
|
|
rescue => e
|
|
puts " \e[31mERROR (#{e.class}): #{e.message}\e[0m"
|
|
puts e.backtrace if ENV["VERBOSE"]
|
|
exit 1
|
|
end
|