fix: remove auto configure environment variables via viper (#2526)

This commit is contained in:
afdesk
2022-07-16 23:32:20 +06:00
committed by GitHub
parent 45dae7c2cf
commit 783e7cfe0c

View File

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