mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
refactor: author file config
This commit is contained in:
@@ -14,8 +14,6 @@ import (
|
||||
// An example of the author file can be found in the examples folder of the repo
|
||||
func Find_authorfile() string {
|
||||
var file string
|
||||
|
||||
if os.Getenv("author_file") == "" {
|
||||
if ConfigVar == nil {
|
||||
cfg, _ := LoadConfig()
|
||||
if cfg == nil {
|
||||
@@ -31,10 +29,11 @@ func Find_authorfile() string {
|
||||
Editor: "built-in",
|
||||
},
|
||||
}
|
||||
}
|
||||
cfg.SetGlobalConfig()
|
||||
}
|
||||
}
|
||||
|
||||
if os.Getenv("author_file") == "" {
|
||||
if ConfigVar.Settings.AuthorFile != "" {
|
||||
file = ConfigVar.Settings.AuthorFile
|
||||
} else if os.Getenv("author_file") != "" {
|
||||
|
||||
Reference in New Issue
Block a user