Use Settings to avoid querying dirs every time

This commit is contained in:
2020-08-05 21:50:39 +02:00
parent 7163b77837
commit cafedd73a2
9 changed files with 140 additions and 130 deletions

View File

@@ -7,6 +7,7 @@ module Validate where
import GHCup
import GHCup.Download
import GHCup.Types
import GHCup.Utils.Dirs
import GHCup.Utils.Logger
import Control.Exception.Safe
@@ -180,7 +181,8 @@ validateTarballs dls = do
where
downloadAll dli = do
let settings = Settings True False Never Curl False
dirs <- liftIO getDirs
let settings = Settings True False Never Curl False dirs
let runLogger = myLoggerT LoggerConfig { lcPrintDebug = True
, colorOutter = B.hPut stderr
, rawOutter = (\_ -> pure ())