1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2025-02-16 17:42:05 +00:00

Change environment variable prefix.

This commit is contained in:
Abubakr-Sadik Nii Nai Davis 2017-07-13 00:24:57 +00:00
parent 609c4ff01c
commit 3d395994b0

View File

@ -95,11 +95,9 @@ func initConfig() {
viper.AddConfigPath(cfgDir) // adding ./cfg as first search path viper.AddConfigPath(cfgDir) // adding ./cfg as first search path
} }
viper.SetEnvPrefix("CISK8S") viper.SetEnvPrefix("KUBE_BENCH")
viper.AutomaticEnv() // read in environment variables that match viper.AutomaticEnv() // read in environment variables that match
// Set defaults
// If a config file is found, read it in. // If a config file is found, read it in.
if err := viper.ReadInConfig(); err != nil { if err := viper.ReadInConfig(); err != nil {
colorPrint(check.FAIL, fmt.Sprintf("Failed to read config file: %v\n", err)) colorPrint(check.FAIL, fmt.Sprintf("Failed to read config file: %v\n", err))