From 1f1774a18a501414bd72fc8a77ba82fe8c2a4e7a Mon Sep 17 00:00:00 2001 From: makeworld Date: Wed, 29 Dec 2021 12:06:40 -0500 Subject: [PATCH] Catch possible errors when setting theme colors --- config/config.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index 2c20fc1..2022daa 100644 --- a/config/config.go +++ b/config/config.go @@ -384,7 +384,9 @@ func Init() error { if !ok { return fmt.Errorf(`include: value for "%s" is not a string: %v`, k2, v2) } - setColor(k2, colorStr) + if err := setColor(k2, colorStr); err != nil { + return err + } } } for k, v := range configTheme.AllSettings() { @@ -392,7 +394,9 @@ func Init() error { if !ok { return fmt.Errorf(`value for "%s" is not a string: %v`, k, v) } - setColor(k, colorStr) + if err := setColor(k, colorStr); err != nil { + return err + } } } if viper.GetBool("a-general.color") {