Apply suggestions from code review

Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
This commit is contained in:
Yarden Shoham 2025-02-24 07:23:18 +02:00 committed by GitHub
parent 9e17871afb
commit 326fdc3e5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,8 +144,8 @@ func (p *postRendererString) Set(val string) error {
if val == "" {
return nil
}
if p.options.binaryPath != "" && p.options.binaryPath != val {
return errors.Errorf("cannot set post-renderer more than once, given: %s, previous: %s", val, p.options.binaryPath)
if p.options.binaryPath != "" {
return fmt.Errorf("cannot specify --post-renderer flag more than once")
}
p.options.binaryPath = val
pr, err := postrender.NewExec(p.options.binaryPath, p.options.args...)