From f739d08a406abc94692a6acadaed8c3d11f864c7 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 1 Mar 2022 15:49:16 +0100 Subject: [PATCH] Fix error handling when setting single config options --- config/set.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/set.go b/config/set.go index 000f139..41686b4 100644 --- a/config/set.go +++ b/config/set.go @@ -120,6 +120,8 @@ func setConfigOption(key string, value interface{}, push bool) (err error) { valueCache, vErr := validateValue(option, value) if vErr == nil { option.activeValue = valueCache + } else { + err = vErr } } @@ -159,6 +161,8 @@ func setDefaultConfigOption(key string, value interface{}, push bool) (err error valueCache, vErr := validateValue(option, value) if vErr == nil { option.activeDefaultValue = valueCache + } else { + err = vErr } }