diff options
-rw-r--r-- | Annex/Ssh.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 4f2b49209..aa357544d 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -54,11 +54,10 @@ data ConsumeStdin = ConsumeStdin | NoConsumeStdin - port. This includes connection caching parameters, and any ssh-options. - If GIT_SSH or GIT_SSH_COMMAND is set, they are used instead. -} sshCommand :: ConsumeStdin -> (SshHost, Maybe SshPort) -> RemoteGitConfig -> SshCommand -> Annex (FilePath, [CommandParam]) -sshCommand cs (host, port) gc remotecmd = - go =<< liftIO (gitSsh host port remotecmd) +sshCommand cs (host, port) gc remotecmd = maybe go return + =<< liftIO (gitSsh' host port remotecmd (consumeStdinParams cs)) where - go (Just (c, ps)) = return (c, consumeStdinParams cs ++ ps) - go Nothing = do + go = do ps <- sshOptions cs (host, port) gc [] return ("ssh", Param host:ps++[Param remotecmd]) |