From a24c285d219d2709b48b7d941e364770ddcc6846 Mon Sep 17 00:00:00 2001 From: Bob Lail Date: Wed, 2 Mar 2022 09:15:35 -0600 Subject: Support `~` in the path to the SSH agent's unix socket --- lib/net/ssh/authentication/agent.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/net/ssh/authentication/agent.rb b/lib/net/ssh/authentication/agent.rb index d6e5d9f..15c75ea 100644 --- a/lib/net/ssh/authentication/agent.rb +++ b/lib/net/ssh/authentication/agent.rb @@ -85,9 +85,9 @@ module Net if agent_socket_factory agent_socket_factory.call elsif identity_agent - unix_socket_class.open(identity_agent) + unix_socket_class.open(File.expand_path(identity_agent)) elsif ENV['SSH_AUTH_SOCK'] && unix_socket_class - unix_socket_class.open(ENV['SSH_AUTH_SOCK']) + unix_socket_class.open(File.expand_path(ENV['SSH_AUTH_SOCK'])) elsif Gem.win_platform? && RUBY_ENGINE != "jruby" Pageant::Socket.open else -- cgit v1.2.1