summaryrefslogtreecommitdiff
path: root/lib/net/ssh
diff options
context:
space:
mode:
authorMiklós Fazekas <mfazekas@szemafor.com>2022-03-28 07:28:01 +0200
committerGitHub <noreply@github.com>2022-03-28 07:28:01 +0200
commit0666139877d5d005f3f04bc626d1752bce1c3e5a (patch)
tree09f619c4ff3d4812bc0bc0fb6be115b563ff588a /lib/net/ssh
parenta45f54fe1de434605af0b7195dd9a91bccd2cec5 (diff)
parenta24c285d219d2709b48b7d941e364770ddcc6846 (diff)
downloadnet-ssh-0666139877d5d005f3f04bc626d1752bce1c3e5a.tar.gz
Merge pull request #850 from boblail/lail/expand-paths-to-identity-agent
Support `~` in the path to the SSH agent's unix socket
Diffstat (limited to 'lib/net/ssh')
-rw-r--r--lib/net/ssh/authentication/agent.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/ssh/authentication/agent.rb b/lib/net/ssh/authentication/agent.rb
index ab6dce9..a344626 100644
--- a/lib/net/ssh/authentication/agent.rb
+++ b/lib/net/ssh/authentication/agent.rb
@@ -88,9 +88,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