From f7c58404738e28b290c7a28d16aed058382c1dfd Mon Sep 17 00:00:00 2001 From: Donal McBreen Date: Wed, 17 May 2023 08:47:41 +0100 Subject: [PATCH] Report the host an error occurred on 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 ``` --- bin/mrsk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mrsk b/bin/mrsk index 7efb94b0..f2eadfae 100755 --- a/bin/mrsk +++ b/bin/mrsk @@ -8,7 +8,7 @@ require "mrsk" begin Mrsk::Cli::Main.start(ARGV) rescue SSHKit::Runner::ExecuteError => e - puts " \e[31mERROR (#{e.cause.class}): #{e.cause.message}\e[0m" + puts " \e[31mERROR (#{e.cause.class}): #{e.message}\e[0m" puts e.cause.backtrace if ENV["VERBOSE"] exit 1 rescue => e