diff options
author | Joey Hess <joey@kitenet.net> | 2014-01-14 16:42:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-01-14 16:42:10 -0400 |
commit | 619e567cc8b59b549f70c95357455ac95fec942d (patch) | |
tree | 3f17722168b5bc9844b2c86dde80dab854ded548 /Remote | |
parent | b52ce804b084b9c182756bb6df944f0604b26f5b (diff) |
avoid needing a build-dep on hxt for Data.AssocList
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Git.hs | 3 | ||||
-rw-r--r-- | Remote/Glacier.hs | 5 | ||||
-rw-r--r-- | Remote/Hook.hs | 5 |
3 files changed, 5 insertions, 8 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index 4c6b95f60..e292707e4 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -54,7 +54,6 @@ import Control.Concurrent import Control.Concurrent.MSampleVar import System.Process (std_in, std_err) import qualified Data.Map as M -import qualified Data.AssocList as A import Control.Exception.Extensible remote :: RemoteType @@ -417,7 +416,7 @@ fsckOnRemote r params program <- readProgramFile r' <- Git.Config.read r env <- getEnvironment - let env' = A.addEntries + let env' = addEntries [ ("GIT_WORK_TREE", Git.repoPath r') , ("GIT_DIR", Git.localGitDir r') ] env diff --git a/Remote/Glacier.hs b/Remote/Glacier.hs index f0ff8d738..3bb92e2f6 100644 --- a/Remote/Glacier.hs +++ b/Remote/Glacier.hs @@ -9,8 +9,6 @@ module Remote.Glacier (remote, jobList) where import qualified Data.Map as M import qualified Data.Text as T -import Data.AssocList as A -import System.Environment import Common.Annex import Types.Remote @@ -27,6 +25,7 @@ import Utility.Metered import qualified Annex import Annex.Content import Annex.UUID +import Utility.Env import System.Process @@ -233,7 +232,7 @@ glacierEnv c u = go =<< getRemoteCredPairFor "glacier" c creds go Nothing = return Nothing go (Just (user, pass)) = do e <- liftIO getEnvironment - return $ Just $ A.addEntries [(uk, user), (pk, pass)] e + return $ Just $ addEntries [(uk, user), (pk, pass)] e creds = AWS.creds u (uk, pk) = credPairEnvironment creds diff --git a/Remote/Hook.hs b/Remote/Hook.hs index d2ce48ddb..1fcb2912f 100644 --- a/Remote/Hook.hs +++ b/Remote/Hook.hs @@ -9,8 +9,6 @@ module Remote.Hook (remote) where import qualified Data.ByteString.Lazy as L import qualified Data.Map as M -import qualified Data.AssocList as A -import System.Environment import Common.Annex import Types.Remote @@ -24,6 +22,7 @@ import Remote.Helper.Special import Remote.Helper.Encryptable import Crypto import Utility.Metered +import Utility.Env type Action = String type HookName = String @@ -78,7 +77,7 @@ hookSetup mu c = do hookEnv :: Action -> Key -> Maybe FilePath -> IO (Maybe [(String, String)]) hookEnv action k f = Just <$> mergeenv (fileenv f ++ keyenv) where - mergeenv l = A.addEntries l <$> getEnvironment + mergeenv l = addEntries l <$> getEnvironment env s v = ("ANNEX_" ++ s, v) keyenv = catMaybes [ Just $ env "KEY" (key2file k) |