1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-12-22 14:48:07 +00:00

Error if the config file can’t be found

This commit is contained in:
Liz Rice 2017-06-22 15:34:01 +01:00
parent c07a8e2c81
commit 96364e3f29

View File

@ -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)
}
}