diff options
author | Robie Basak <robie@justgohome.co.uk> | 2016-03-23 03:42:13 +0000 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-03-23 11:42:26 -0400 |
commit | a20c821b6b93886e9fcb60bf0c6e49ed8e480862 (patch) | |
tree | 32eaf2b468c9f5adb6d5dd70660ae654da57debc /Remote | |
parent | dd3c012b169d46e5a7a1af86b1e31797226edfff (diff) |
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 3653b40, and presumably regressed fully when
sshOptions was changed some time later.
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Ddar.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Remote/Ddar.hs b/Remote/Ddar.hs index 4a46fe15c..8758949c9 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 |