summaryrefslogtreecommitdiff
path: root/Creds.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-22 19:13:31 +0100
committerGravatar Joey Hess <joey@kitenet.net>2013-09-22 19:13:31 +0100
commitb81e86a6ed7db7e8957f664631a8cdb4126e02dc (patch)
tree13b7b4ac26c8b8d05852ec48d158d149478b2781 /Creds.hs
parentf159e8bccd823a9125f3134fba5a5dc3c7dd7df7 (diff)
successfully builds (except XMPP)
Diffstat (limited to 'Creds.hs')
-rw-r--r--Creds.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/Creds.hs b/Creds.hs
index 588d67cfe..70e00ef34 100644
--- a/Creds.hs
+++ b/Creds.hs
@@ -16,10 +16,9 @@ import Crypto
import Types.Remote (RemoteConfig, RemoteConfigKey)
import Remote.Helper.Encryptable (remoteCipher, embedCreds)
#ifndef mingw32_HOST_OS
-import Utility.Env (setEnv)
+import Utility.Env (setEnv, getEnv)
#endif
-import System.Environment
import qualified Data.ByteString.Lazy.Char8 as L
import qualified Data.Map as M
import Utility.Base64
@@ -101,11 +100,10 @@ getRemoteCredPair c storage = maybe fromcache (return . Just) =<< fromenv
{- Gets a CredPair from the environment. -}
getEnvCredPair :: CredPairStorage -> IO (Maybe CredPair)
getEnvCredPair storage = liftM2 (,)
- <$> get uenv
- <*> get penv
+ <$> getEnv uenv
+ <*> getEnv penv
where
(uenv, penv) = credPairEnvironment storage
- get = catchMaybeIO . getEnv
{- Stores a CredPair in the environment. -}
setEnvCredPair :: CredPair -> CredPairStorage -> IO ()