mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2026-04-15 06:56:51 +00:00
Error if the config file can’t be found
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user