From d1b095ba7354ee430ef3332ffd80ab7cb09f77ed Mon Sep 17 00:00:00 2001 From: EnumDev Date: Sun, 21 Dec 2025 16:36:24 +0200 Subject: [PATCH] Improve motherboard module --- src/modules.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/modules.go b/src/modules.go index 14ba5c2..792f6f9 100644 --- a/src/modules.go +++ b/src/modules.go @@ -152,10 +152,17 @@ func initializeModuleMap() { // Motherboard module MotherboardModule := StormfetchModule{stormfetchModuleConfig: stormfetchModuleConfig{Name: "motherboard", Format: "%3Motherboard: %4$MOTHERBOARD"}, Execute: func(sm StormfetchModule) string { + motherboard := GetMotherboardModel() + + // Return empty string if can't detect motherboard model + if motherboard == "" { + return "" + } + return os.Expand(sm.Format, func(s string) string { switch s { case "MOTHERBOARD": - return GetMotherboardModel() + return motherboard default: return "" }