Fall back to cached ghcup-<..>.json

This commit is contained in:
2020-04-27 23:23:34 +02:00
parent 1ed6e49a81
commit 56c439d716
2 changed files with 63 additions and 14 deletions

View File

@@ -789,9 +789,9 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
(GHCupInfo treq dls) <-
( runLogger
. flip runReaderT settings
. runE @'[JSONError , DownloadFailed]
. runE @'[JSONError , DownloadFailed, FileDoesNotExistError]
$ liftE
$ getDownloads (maybe GHCupURL OwnSource optUrlSource)
$ getDownloadsF (maybe GHCupURL OwnSource optUrlSource)
)
>>= \case
VRight r -> pure r