Fix config file loading to read from a file
Accidentally used `FromToml()` when trying to read from a file path rather than `FromTomlFile()` which will read the file and then call `FromToml()`. Fixes #6578.pull/6580/head
parent
b39995be91
commit
5a6a34144e
|
@ -200,7 +200,7 @@ func (cmd *Command) ParseConfig(path string) (*Config, error) {
|
|||
log.Printf("Using configuration at: %s\n", path)
|
||||
|
||||
config := NewConfig()
|
||||
if err := config.FromToml(path); err != nil {
|
||||
if err := config.FromTomlFile(path); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ func (cmd *PrintConfigCommand) parseConfig(path string) (*Config, error) {
|
|||
}
|
||||
|
||||
config := NewConfig()
|
||||
if err := config.FromToml(path); err != nil {
|
||||
if err := config.FromTomlFile(path); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return config, nil
|
||||
|
|
Loading…
Reference in New Issue