diff options
author | Joey Hess <joey@kitenet.net> | 2013-09-22 19:13:31 +0100 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-09-22 19:13:31 +0100 |
commit | b81e86a6ed7db7e8957f664631a8cdb4126e02dc (patch) | |
tree | 13b7b4ac26c8b8d05852ec48d158d149478b2781 /Creds.hs | |
parent | f159e8bccd823a9125f3134fba5a5dc3c7dd7df7 (diff) |
successfully builds (except XMPP)
Diffstat (limited to 'Creds.hs')
-rw-r--r-- | Creds.hs | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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 () |