summaryrefslogtreecommitdiff
path: root/Remote/Tahoe.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-11 14:06:50 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-11 14:07:56 -0400
commit066a06606aeb7f4a3cd70e7b592fef8dc6a9b71e (patch)
tree98458711a7dab3e3c669b513ed7b84cc2502374b /Remote/Tahoe.hs
parentf779747a0d4d5c9e39a3c82498fe1809d56b4d25 (diff)
plumb creds from webapp to initremote
Avoids abusing setting environment variables, which was always a hack and won't work on windows.
Diffstat (limited to 'Remote/Tahoe.hs')
-rw-r--r--Remote/Tahoe.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Remote/Tahoe.hs b/Remote/Tahoe.hs
index 6b0113ac3..56a17eb62 100644
--- a/Remote/Tahoe.hs
+++ b/Remote/Tahoe.hs
@@ -29,6 +29,7 @@ import Control.Concurrent.STM
import Common.Annex
import Types.Remote
+import Types.Creds
import qualified Git
import Config
import Config.Cost
@@ -85,8 +86,8 @@ gen r u c gc = do
remotetype = remote
}
-tahoeSetup :: Maybe UUID -> RemoteConfig -> Annex (RemoteConfig, UUID)
-tahoeSetup mu c = do
+tahoeSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
+tahoeSetup mu _ c = do
furl <- fromMaybe (fromMaybe missingfurl $ M.lookup furlk c)
<$> liftIO (getEnv "TAHOE_FURL")
u <- maybe (liftIO genUUID) return mu