diff options
author | nodivbyzero <nodivbyzero@gmail.com> | 2023-12-13 17:08:33 -0800 |
---|---|---|
committer | nodivbyzero <nodivbyzero@gmail.com> | 2023-12-13 17:08:33 -0800 |
commit | ced1b81e32f971a80e474e9661b9c1b9c96569e7 (patch) | |
tree | f59862ee69d374794460dbaec154addd7bb794ba /plumbing/transport/ssh/common.go | |
parent | 952f1baf5e6ffc9e2e143821368944b40fa0bdbf (diff) | |
download | go-git-ced1b81e32f971a80e474e9661b9c1b9c96569e7.tar.gz |
plumbing: check setAuth error. Fixes #185
Diffstat (limited to 'plumbing/transport/ssh/common.go')
-rw-r--r-- | plumbing/transport/ssh/common.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plumbing/transport/ssh/common.go b/plumbing/transport/ssh/common.go index 46fda73..05dea44 100644 --- a/plumbing/transport/ssh/common.go +++ b/plumbing/transport/ssh/common.go @@ -49,7 +49,9 @@ type runner struct { func (r *runner) Command(cmd string, ep *transport.Endpoint, auth transport.AuthMethod) (common.Command, error) { c := &command{command: cmd, endpoint: ep, config: r.config} if auth != nil { - c.setAuth(auth) + if err := c.setAuth(auth); err != nil { + return nil, err + } } if err := c.connect(); err != nil { |