summaryrefslogtreecommitdiff
path: root/Creds.hs
diff options
context:
space:
mode:
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 ()