summaryrefslogtreecommitdiff
path: root/lib/leap_cli/ssh/backend.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-06-29 16:55:06 -0700
committerelijah <elijah@riseup.net>2016-07-01 14:48:42 -0700
commit5780f5dcc024d4f140fe8f6e8dc3f7c4e905a8ec (patch)
treed68e366f74129f0fcad06fc415f9ab0e65ead50f /lib/leap_cli/ssh/backend.rb
parente03bfce9db2a213527beb16a4f4dd1f13d96be6e (diff)
leap cli: move everything we can from leap_cli to leap_platform
Diffstat (limited to 'lib/leap_cli/ssh/backend.rb')
-rw-r--r--lib/leap_cli/ssh/backend.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/leap_cli/ssh/backend.rb b/lib/leap_cli/ssh/backend.rb
index f42379cc..67c6ec9a 100644
--- a/lib/leap_cli/ssh/backend.rb
+++ b/lib/leap_cli/ssh/backend.rb
@@ -94,7 +94,7 @@ module LeapCli
# some prewritten servers-side scripts
def scripts
- @scripts ||= LeapCli::SSH::Scripts.new(self, @host)
+ @scripts ||= LeapCli::SSH::Scripts.new(self, @host.hostname)
end
private
@@ -139,6 +139,9 @@ module LeapCli
@logger.log(:failed, args.join(' '), host: @host.hostname) do
@logger.log("Connection timed out")
end
+ if @options[:raise_error]
+ raise LeapCli::SSH::TimeoutError, exc.to_s
+ end
else
raise
end