Make sure directories exist

This commit is contained in:
2020-03-17 19:16:21 +01:00
parent 35b6359c1b
commit f8448cf02b
2 changed files with 8 additions and 10 deletions

View File

@@ -493,6 +493,10 @@ main = do
>>= \opt@Options {..} -> do
let settings = toSettings opt
-- create ~/.ghcup dir
ghcdir <- ghcupBaseDir
createDirIfMissing newDirPerms ghcdir
-- logger interpreter
logfile <- initGHCupFileLogging [rel|ghcup.log|]
let runLogger = myLoggerT LoggerConfig
@@ -588,10 +592,6 @@ main = do
, DownloadFailed
]
-- create ~/.ghcup dir
ghcdir <- ghcupBaseDir
createDirIfMissing newDirPerms ghcdir
dls <-
( runLogger
. flip runReaderT settings