summaryrefslogtreecommitdiff
path: root/Remote/Helper/Ssh.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Helper/Ssh.hs')
-rw-r--r--Remote/Helper/Ssh.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Remote/Helper/Ssh.hs b/Remote/Helper/Ssh.hs
index 6dfadd117..a4d91ab92 100644
--- a/Remote/Helper/Ssh.hs
+++ b/Remote/Helper/Ssh.hs
@@ -19,13 +19,17 @@ import Remote.Helper.Messages
import Messages.Progress
import Utility.Metered
import Utility.Rsync
+import Utility.SshHost
import Types.Remote
import Types.Transfer
import Config
toRepo :: ConsumeStdin -> Git.Repo -> RemoteGitConfig -> SshCommand -> Annex (FilePath, [CommandParam])
toRepo cs r gc remotecmd = do
- let host = fromMaybe (giveup "bad ssh url") $ Git.Url.hostuser r
+ let host = maybe
+ (giveup "bad ssh url")
+ (either error id . mkSshHost)
+ (Git.Url.hostuser r)
sshCommand cs (host, Git.Url.port r) gc remotecmd
{- Generates parameters to run a git-annex-shell command on a remote