refactor: add config load to author func

This commit is contained in:
Slug-Boi
2025-04-20 22:13:45 +02:00
parent 3e1ba8d965
commit f89d399e17
+6 -1
View File
@@ -14,7 +14,12 @@ import (
// An example of the author file can be found in the examples folder of the repo // An example of the author file can be found in the examples folder of the repo
func Find_authorfile() string { func Find_authorfile() string {
if os.Getenv("author_file") == "" { if os.Getenv("author_file") == "" {
return ConfigVar.GetAuthorFile() if ConfigVar == nil {
cfg, _ := LoadConfig()
cfg.SetGlobalConfig()
}
return ConfigVar.Settings.AuthorFile
} else { } else {
return os.Getenv("author_file") return os.Getenv("author_file")
} }