Commit 94b5d602 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Don't append '.' to filename in message. Make config file end in a new line.

parent b8e9e939
......@@ -158,7 +158,7 @@ loadConfig configFile =
minp <- readFileIfExists configFile
case minp of
Nothing -> do hPutStrLn stderr $ "Config file " ++ configFile ++ " not found."
hPutStrLn stderr $ "Writing default configuration to " ++ configFile ++ "."
hPutStrLn stderr $ "Writing default configuration to " ++ configFile
writeDefaultConfigFile configFile defaultConf
return defaultConf
Just inp -> case parseBasicStanza configFieldDescrs defaultConf inp of
......@@ -174,7 +174,7 @@ loadConfig configFile =
writeDefaultConfigFile :: FilePath -> ConfigFlags -> IO ()
writeDefaultConfigFile file cfg =
do createDirectoryIfMissing True (takeDirectory file)
writeFile file $ showFields configWriteFieldDescrs cfg
writeFile file $ showFields configWriteFieldDescrs cfg ++ "\n"
showConfig :: ConfigFlags -> String
showConfig = showFields configFieldDescrs
......
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