summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-06-06 12:57:27 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-06-06 12:57:27 -0400
commit954898841c332833dd1b2e40d745fd5ce4caf41d (patch)
tree10c1c550ce8bfa973ce759402e37dce8fde252e6 /Annex
parentca671b4e1004bfcdb28c7de15d5936e90b6e7682 (diff)
Avoid error about git-annex-shell not being found when syncing with -J with a git remote where git-annex-shell is not installed.
This commit was sponsored by andrea rota.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Ssh.hs16
1 files changed, 11 insertions, 5 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index 50a516342..4e6cc6a59 100644
--- a/Annex/Ssh.hs
+++ b/Annex/Ssh.hs
@@ -193,8 +193,10 @@ prepSocket socketfile gc sshparams = do
c <- Annex.getState Annex.concurrency
case c of
- Concurrent {} -> makeconnection socketlock
- NonConcurrent -> return ()
+ Concurrent {}
+ | annexUUID (remoteGitConfig gc) /= NoUUID ->
+ makeconnection socketlock
+ _ -> return ()
lockFileCached socketlock
where
@@ -207,11 +209,15 @@ prepSocket socketfile gc sshparams = do
-- When we can start the connection in batch mode,
-- ssh won't prompt to the console.
(_, connected) <- liftIO $ processTranscript "ssh"
- (["-o", "BatchMode=true"] ++ toCommand startps)
+ (["-o", "BatchMode=true"]
+ ++ toCommand startps)
Nothing
- unless connected $
- prompt $ void $ liftIO $
+ unless connected $ do
+ ok <- prompt $ liftIO $
boolSystem "ssh" startps
+ unless ok $
+ warning $ "Unable to run git-annex-shell on remote " ++
+ Git.repoDescribe (gitConfigRepo (remoteGitConfig gc))
-- Parameters to get ssh connected to the remote host,
-- by asking it to run a no-op command.