summaryrefslogtreecommitdiff
path: root/Remote/Hook.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-14 16:42:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-14 16:42:10 -0400
commit619e567cc8b59b549f70c95357455ac95fec942d (patch)
tree3f17722168b5bc9844b2c86dde80dab854ded548 /Remote/Hook.hs
parentb52ce804b084b9c182756bb6df944f0604b26f5b (diff)
avoid needing a build-dep on hxt for Data.AssocList
Diffstat (limited to 'Remote/Hook.hs')
-rw-r--r--Remote/Hook.hs5
1 files changed, 2 insertions, 3 deletions
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)