mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-419] Btcctl parsing error (introduced by NOD-386) (#462)
This commit is contained in:
parent
1f35378a4d
commit
83bad65d3a
@ -168,7 +168,7 @@ func loadConfig() (*ConfigFlags, []string, error) {
|
||||
// errors aside from the help message error can be ignored here since
|
||||
// they will be caught by the final parse below.
|
||||
preCfg := activeConfig
|
||||
preParser := flags.NewParser(&preCfg, flags.HelpFlag)
|
||||
preParser := flags.NewParser(preCfg, flags.HelpFlag)
|
||||
_, err := preParser.Parse()
|
||||
if err != nil {
|
||||
if e, ok := err.(*flags.Error); ok && e.Type == flags.ErrHelp {
|
||||
@ -209,7 +209,7 @@ func loadConfig() (*ConfigFlags, []string, error) {
|
||||
}
|
||||
|
||||
// Load additional config from file.
|
||||
parser := flags.NewParser(&activeConfig, flags.Default)
|
||||
parser := flags.NewParser(activeConfig, flags.Default)
|
||||
err = flags.NewIniParser(parser).ParseFile(preCfg.ConfigFile)
|
||||
if err != nil {
|
||||
if _, ok := err.(*os.PathError); !ok {
|
||||
|
Loading…
x
Reference in New Issue
Block a user