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:
parent
609c4ff01c
commit
3d395994b0
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user