Error if the config file can’t be found

pull/9/head
Liz Rice 7 years ago
parent c07a8e2c81
commit 96364e3f29

@ -98,5 +98,8 @@ func initConfig() {
// If a config file is found, read it in.
if err := viper.ReadInConfig(); err == nil {
colorPrint(check.INFO, fmt.Sprintf("Using config file: %s\n", viper.ConfigFileUsed()))
} else {
colorPrint(check.FAIL, fmt.Sprintf("Faied to read config file: %v\n", err))
os.Exit(1)
}
}

Loading…
Cancel
Save