From 6cb9e5c32f46d0d7bcfdc96c7d05a93c08e9d20a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 8 Aug 2014 14:19:08 -0400 Subject: [PATCH] show missing url= parameter error sooner --- Remote/WebDAV.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs index 2c621b6333..af3af79020 100644 --- a/Remote/WebDAV.hs +++ b/Remote/WebDAV.hs @@ -77,8 +77,9 @@ gen r u c gc = new <$> remoteCost gc expensiveRemoteCost webdavSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID) webdavSetup mu mcreds c = do u <- maybe (liftIO genUUID) return mu - let url = fromMaybe (error "Specify url=") $ - M.lookup "url" c + url <- case M.lookup "url" c of + Nothing -> error "Specify url=" + Just url -> return url c' <- encryptionSetup c creds <- maybe (getCreds c' u) (return . Just) mcreds testDav url creds