1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-11-03 02:37:23 -05:00

Catch possible errors when setting theme colors

This commit is contained in:
makeworld 2021-12-29 12:06:40 -05:00
parent cabc0660fd
commit 1f1774a18a

View File

@ -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") {