From 7948110134af191d5ac1613b57e00657cd8c58b5 Mon Sep 17 00:00:00 2001 From: Robie Basak Date: Wed, 23 Mar 2016 03:42:13 +0000 Subject: [PATCH] ddar remote: fix ssh calls sshOptions is now designed for working out ssh options only, and may insert the extra options it is given to the middle. So it is incorrect to call it with the remote parameters at the end. Instead, append them to its return value. This half regressed in 5be7ba7, and presumably regressed fully when sshOptions was changed some time later. --- Remote/Ddar.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Remote/Ddar.hs b/Remote/Ddar.hs index 4a46fe15ce..8758949c9c 100644 --- a/Remote/Ddar.hs +++ b/Remote/Ddar.hs @@ -122,8 +122,8 @@ ddarRemoteCall :: DdarRepo -> Char -> [CommandParam] -> Annex (String, [CommandP ddarRemoteCall ddarrepo cmd params | ddarLocal ddarrepo = return ("ddar", localParams) | otherwise = do - os <- sshOptions (host, Nothing) (ddarRepoConfig ddarrepo) remoteParams - return ("ssh", os) + os <- sshOptions (host, Nothing) (ddarRepoConfig ddarrepo) [] + return ("ssh", os ++ remoteParams) where (host, ddarrepo') = splitRemoteDdarRepo ddarrepo localParams = Param [cmd] : Param (ddarRepoLocation ddarrepo) : params @@ -158,8 +158,8 @@ ddarDirectoryExists ddarrepo Left _ -> Right False Right status -> Right $ isDirectory status | otherwise = do - ps <- sshOptions (host, Nothing) (ddarRepoConfig ddarrepo) params - exitCode <- liftIO $ safeSystem "ssh" ps + ps <- sshOptions (host, Nothing) (ddarRepoConfig ddarrepo) [] + exitCode <- liftIO $ safeSystem "ssh" (ps ++ params) case exitCode of ExitSuccess -> return $ Right True ExitFailure 1 -> return $ Right False