mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 07:29:00 -08:00
fix: remove auto configure environment variables via viper (#2526)
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
@@ -122,11 +121,6 @@ func loadPluginCommands() []*cobra.Command {
|
||||
}
|
||||
|
||||
func initConfig(configFile string) error {
|
||||
// Configure environment variables
|
||||
viper.SetEnvPrefix("trivy") // will be uppercased automatically
|
||||
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
|
||||
viper.AutomaticEnv()
|
||||
|
||||
// Read from config
|
||||
viper.SetConfigFile(configFile)
|
||||
viper.SetConfigType("yaml")
|
||||
|
||||
Reference in New Issue
Block a user