Skip to content

Commit 4a78c58

Browse files
committed
fix(conf): return a valid Cfg when reading goinfer.yml fails
depending on the `./goinfer -run -start`, the error may be ignored (a new goinfer.yml maybe generated)
1 parent 7405045 commit 4a78c58

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

conf/read.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func ReadYAMLData(yml []byte, noAPIKey bool, extra, start string) (*Cfg, error)
5555

5656
// error from cfg.parse()
5757
if err != nil {
58-
return nil, err
58+
return &cfg, err // return a valid Cfg, because the error can be ignored
5959
}
6060

6161
return &cfg, cfg.validate(noAPIKey)

0 commit comments

Comments
 (0)