Log when a new config file is created (#33)

This commit is contained in:
Jamie Holdstock 2020-05-19 14:24:59 +01:00 committed by GitHub
parent fff8132b13
commit 702aef3ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,6 +191,7 @@ func loadConfig() (*config, error) {
// Create a default config file when one does not exist and the user did
// not specify an override.
if preCfg.ConfigFile == defaultConfigFile && !fileExists(preCfg.ConfigFile) {
fmt.Printf("Writing a config file with default values to %s\n", defaultConfigFile)
preIni := flags.NewIniParser(preParser)
err = preIni.WriteFile(preCfg.ConfigFile,
flags.IniIncludeComments|flags.IniIncludeDefaults)