Skip to content

Commit

Permalink
produce message for invalid TOML
Browse files Browse the repository at this point in the history
  • Loading branch information
EasterTheBunny committed Feb 12, 2024
1 parent 6531d4d commit f6d7558
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/config/toml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ func (c *Core) ValidateConfig() (err error) {
err = multierr.Append(err, configutils.ErrInvalid{Name: "RootDir", Value: true, Msg: fmt.Sprintf("Failed to expand RootDir. Please use an explicit path: %s", verr)})
}

if (*c.OCR.Enabled || *c.OCR2.Enabled) && !*c.P2P.V2.Enabled {
err = multierr.Append(err, configutils.ErrInvalid{Name: "OCRP2P", Value: true, Msg: fmt.Sprint("P2P required for OCR or OCR2. Please configure P2P or disable OCR/OCR2.")})

Check failure on line 102 in core/config/toml/types.go

View workflow job for this annotation

GitHub Actions / lint

S1039: unnecessary use of fmt.Sprint (gosimple)
}

return err
}

Expand Down

0 comments on commit f6d7558

Please sign in to comment.