Commit 0a5c5b6f authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Don't include the default repo when loading the config file

So we don't end up downloading the index from hackage twice.
parent 0b800905
......@@ -163,7 +163,7 @@ loadConfig verbosity configFile =
notice verbosity $ "Writing default configuration to " ++ configFile
writeDefaultConfigFile configFile defaultConf
return defaultConf
Just inp -> case parseBasicStanza configFieldDescrs defaultConf inp of
Just inp -> case parseBasicStanza configFieldDescrs defaultConf' inp of
ParseOk ws conf ->
do when (not $ null ws) $ warn verbosity $
unlines (map (showPWarning configFile) ws)
......@@ -173,6 +173,7 @@ loadConfig verbosity configFile =
++ configFile ++ ": " ++ showPError err
warn verbosity $ "Using default configuration."
return defaultConf
where defaultConf' = defaultConf { configRemoteRepos = [] }
writeDefaultConfigFile :: FilePath -> SavedConfig -> IO ()
writeDefaultConfigFile file cfg =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment