diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-14 15:05:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-14 15:05:29 -0400 |
commit | 1e6b79bdec608948560b0b3221aa6b23436be1bf (patch) | |
tree | 8b3ff1d8903e31c5641ebcf72b959b5664d0549e /Remote | |
parent | 4aedb2d1d42b593609d1b5ca2ad4405feb312407 (diff) |
fix remote fsck to run in remote
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Git.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index a3ece1443..480d4f714 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -42,6 +42,7 @@ import Utility.Metered #ifndef mingw32_HOST_OS import Utility.CopyFile #endif +import Utility.Env import Utility.Batch import Remote.Helper.Git import Remote.Helper.Messages @@ -410,7 +411,13 @@ fsckOnRemote r params Just (c, ps) -> batchCommand c ps | otherwise = return $ do program <- readProgramFile - batchCommand program $ Param "fsck" : params + env <- getEnvironment + r' <- Git.Config.read r + let env' = + [ ("GIT_WORK_TREE", Git.repoPath r') + , ("GIT_DIR", Git.localGitDir r') + ] ++ env + batchCommandEnv program (Param "fsck" : params) (Just env') {- Runs an action on a local repository inexpensively, by making an annex - monad using that repository. -} |