mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 20:55:47 +00:00
refactor: add config load to author func
This commit is contained in:
@@ -14,7 +14,12 @@ import (
|
||||
// An example of the author file can be found in the examples folder of the repo
|
||||
func Find_authorfile() string {
|
||||
if os.Getenv("author_file") == "" {
|
||||
return ConfigVar.GetAuthorFile()
|
||||
if ConfigVar == nil {
|
||||
cfg, _ := LoadConfig()
|
||||
cfg.SetGlobalConfig()
|
||||
}
|
||||
|
||||
return ConfigVar.Settings.AuthorFile
|
||||
} else {
|
||||
return os.Getenv("author_file")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user