mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
Merge pull request #30 from prymitive/fix-config-file
fix(config): use correct variable name for --config.file
This commit is contained in:
@@ -39,7 +39,7 @@ func init() {
|
||||
pflag.StringSlice("annotations.visible", []string{},
|
||||
"List of annotations that are visible by default")
|
||||
|
||||
pflag.String("config.path", "", "Full path to the configuration file")
|
||||
pflag.String("config.file", "", "Full path to the configuration file")
|
||||
|
||||
pflag.Bool("debug", false, "Enable debug mode")
|
||||
|
||||
@@ -102,10 +102,10 @@ func (config *configSchema) Read() {
|
||||
}
|
||||
|
||||
v.SetConfigType("yaml")
|
||||
configPath := v.GetString("config.path")
|
||||
if configPath != "" {
|
||||
log.Infof("Reading configuration file %s", configPath)
|
||||
v.SetConfigFile(configPath)
|
||||
configFile := v.GetString("config.file")
|
||||
if configFile != "" {
|
||||
log.Infof("Reading configuration file %s", configFile)
|
||||
v.SetConfigFile(configFile)
|
||||
}
|
||||
|
||||
err = v.ReadInConfig()
|
||||
|
||||
Reference in New Issue
Block a user