Apply suggestions from code review

Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
pull/30572/head
Yarden Shoham 7 months ago committed by GitHub
parent 9e17871afb
commit 326fdc3e5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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...)

Loading…
Cancel
Save