summaryrefslogtreecommitdiff
path: root/Remote/External.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/External.hs')
-rw-r--r--Remote/External.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Remote/External.hs b/Remote/External.hs
index 69c47a6e4..54db82d1f 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -16,6 +16,7 @@ import Types.UrlContents
import qualified Git
import Config
import Git.Config (isTrue, boolConfig)
+import Git.Env
import Remote.Helper.Special
import Remote.Helper.ReadOnly
import Remote.Helper.Messages
@@ -369,7 +370,9 @@ fromExternal lck external extractor a =
startExternal :: ExternalType -> Annex ExternalState
startExternal externaltype = do
errrelayer <- mkStderrRelayer
+ g <- Annex.gitRepo
liftIO $ do
+ p <- propgit g cmdp
(Just hin, Just hout, Just herr, pid) <-
createProcess p `catchIO` runerr
fileEncoding hin
@@ -387,11 +390,14 @@ startExternal externaltype = do
}
where
cmd = externalRemoteProgram externaltype
- p = (proc cmd [])
+ cmdp = (proc cmd [])
{ std_in = CreatePipe
, std_out = CreatePipe
, std_err = CreatePipe
}
+ propgit g p = do
+ environ <- propGitEnv g
+ return $ p { env = Just environ }
runerr _ = error ("Cannot run " ++ cmd ++ " -- Make sure it's in your PATH and is executable.")