fix the file not found error message when passing -config
This commit is contained in:
parent
7307c51d6f
commit
9eae8de902
|
@ -225,7 +225,7 @@ func findConfigFile(configFile *string) (string, error) {
|
||||||
func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
|
func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
|
||||||
foundConfigFile, err := findConfigFile(flags.ConfigFile)
|
foundConfigFile, err := findConfigFile(flags.ConfigFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
dlog.Fatalf("Unable to load the configuration file [%s] -- Maybe use the -config command-line switch?", flags.ConfigFile)
|
dlog.Fatalf("Unable to load the configuration file [%s] -- Maybe use the -config command-line switch?", *flags.ConfigFile)
|
||||||
}
|
}
|
||||||
config := newConfig()
|
config := newConfig()
|
||||||
md, err := toml.DecodeFile(foundConfigFile, &config)
|
md, err := toml.DecodeFile(foundConfigFile, &config)
|
||||||
|
|
Loading…
Reference in New Issue